Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Enchantment hooks

Generated from the 26.2 decompile by tools/gen_reference.py. Do not edit by hand.

Every public entry point of EnchantmentHelper, with the classes that call it. The enchantment package barely calls anything and everything calls it, so this table is the system’s real interface: each row is a moment at which some other system asks whether an enchantment wants to change what happens. Callers are the declaring files, one per class, excluding EnchantmentHelper itself. See Enchantments for what an enchantment is and Enchanting for the selection half.

50 entry points, 47 of them called from outside the class

entry pointoverloadscalled from
EnchantmentHelper.canStoreEnchantments1AnvilMenu
EnchantmentHelper.createBook1CreativeModeTabs
EnchantmentHelper.doPostAttackEffects1AbstractCubeMob, AbstractWindCharge, Bee, ChargeAttack, EnderDragon, EvokerFangs, HoglinBase, IronGolem, LargeFireball, LivingEntity, LlamaSpit, Mob, Player, RamTarget, ShulkerBullet, SmallFireball, WitherSkull
EnchantmentHelper.doPostAttackEffectsWithItemSource1AbstractArrow, Player
EnchantmentHelper.doPostAttackEffectsWithItemSourceOnBreak1ThrownTrident
EnchantmentHelper.doPostPiercingAttackEffects1LivingEntity
EnchantmentHelper.enchantItem2EnchantWithLevelsFunction
EnchantmentHelper.enchantItemFromProvider1EnderMan, Mob, Pillager, SkeletonTrapGoal, Vindicator
EnchantmentHelper.filterCompatibleEnchantments1nothing outside the class
EnchantmentHelper.forEachModifier2ItemStack
EnchantmentHelper.getAvailableEnchantmentResults1nothing outside the class
EnchantmentHelper.getDamageProtection1LivingEntity
EnchantmentHelper.getEnchantmentCost1EnchantmentMenu
EnchantmentHelper.getEnchantmentLevel1EnchantedCountIncreaseFunction, LootItemRandomChanceWithEnchantedBonusCondition
EnchantmentHelper.getEnchantmentsForCrafting1AnvilMenu, EnchantCommand, GrindstoneMenu, RepairItemRecipe
EnchantmentHelper.getFishingLuckBonus1FishingRodItem
EnchantmentHelper.getFishingTimeReduction1FishingRodItem
EnchantmentHelper.getHighestLevel1nothing outside the class
EnchantmentHelper.getItemEnchantmentLevel1ApplyBonusCount, BonusLevelTableCondition
EnchantmentHelper.getPiercingCount1AbstractArrow
EnchantmentHelper.getRandomItemWith1ExperienceOrb
EnchantmentHelper.getTridentReturnToOwnerAcceleration1ThrownTrident
EnchantmentHelper.getTridentSpinAttackStrength1TridentItem
EnchantmentHelper.has1AbstractHorse, Allay, ArmorSlot, ArmorStand, Equippable, Mob, Piglin, Player, ZombieVillager
EnchantmentHelper.hasAnyEnchantments1GrindstoneMenu
EnchantmentHelper.hasTag1BeehiveBlock, DecoratedPotBlock, IceBlock, InfestedBlock
EnchantmentHelper.isEnchantmentCompatible1EnchantCommand
EnchantmentHelper.isImmuneToDamage1LivingEntity
EnchantmentHelper.modifyArmorEffectiveness1CombatRules
EnchantmentHelper.modifyCrossbowChargingTime1CrossbowItem
EnchantmentHelper.modifyDamage1AbstractArrow, LivingEntity, Mob, ServerPlayer, ThrownTrident
EnchantmentHelper.modifyDurabilityToRepairFromXp1ExperienceOrb
EnchantmentHelper.modifyFallBasedDamage1MaceItem
EnchantmentHelper.modifyKnockback1AbstractArrow, LivingEntity
EnchantmentHelper.onHitBlock1AbstractArrow, ServerPlayerGameMode, ThrownTrident
EnchantmentHelper.onProjectileSpawned1Projectile
EnchantmentHelper.pickHighestLevel1CrossbowItem, TridentItem
EnchantmentHelper.processAmmoUse1ProjectileWeaponItem
EnchantmentHelper.processBlockExperience1Block
EnchantmentHelper.processDurabilityChange1ItemStack
EnchantmentHelper.processEquipmentDropChance1Mob
EnchantmentHelper.processMobExperience1LivingEntity
EnchantmentHelper.processProjectileCount1ProjectileWeaponItem
EnchantmentHelper.processProjectileSpread1ProjectileWeaponItem
EnchantmentHelper.runLocationChangedEffects2LivingEntity, ServerPlayer
EnchantmentHelper.selectEnchantment1EnchantmentMenu, EnchantmentsByCost, EnchantmentsByCostWithDifficulty
EnchantmentHelper.setEnchantments1AnvilMenu
EnchantmentHelper.stopLocationBasedEffects2LivingEntity, ServerPlayer
EnchantmentHelper.tickEffects1LivingEntity
EnchantmentHelper.updateEnchantments1GrindstoneMenu, ItemStack, RepairItemRecipe, SetEnchantmentsFunction