Hold To Enchant — Auto Enchant logo

Hold To Enchant — Auto Enchant

Simply Hold Your Tools To Enchant! (Achievement Friendly)

Hold to Enchant is a script-based utility that immediately enchants the item you're holding to the max level. Simply hold an item, and the add-on handles the rest.

 

--- This add-on doesn't disable achievement.

 

MAIN FEATURES

Auto enchant

Instant Enchanting — Automatically applies relevant enchants the moment you hold an item or equip an armor. Swords get Sharpness V, Looting III, Fire Aspect II, and Unbreaking III. Picks get Fortune III or Silk Touch. And so on.

Conflicting Enchantments — Use the configuration menu to choose between conflicting enchants like Silk Touch vs Fortune, Mending vs Infinity, or Depth Strider vs Frost Walker — no guesswork needed.

Custom items

(NewBows add-on from SystemTv)

Universal Compatibility — Works for all vanilla tools, weapons, and armor, plus custom items from other add-ons.

 

Perfect combo with my other add-on Fortune Extender — Duplicate any block you mine with Fortune enchantment!

 


⚙️TECHNICAL DEEP-DIVE

The engine is event-driven, subscribing to playerHotbarSelectedSlotChange and playerInventoryItemChange instead of polling on a fixed interval. Enchanting only runs when the player switches hotbar slots or a new item lands in the active slot.

 

Armor and offhand are checked every 5 ticks when "Enchant on Equip" toggle is on.

 

- Items are matched against a lookup table (ENCHANTABLE_ITEMS), then buildEnchantIds() picks the enchant set for that item type.
- Enchants are applied through EnchantableComponent: each one is checked with canAddEnchantment(), then applied in one addEnchantments() call. No commands are used.
- Namespace fallback: if a custom item like example:example_sword isn't in the table, the script checks whether the ID ends with _sword, _axe, _pickaxe, etc. Custom items with no known suffix get every enchantment they can legally hold.

 

--- NOTE: Only vanilla enchantments supported!

 

PERFORMANCE

- Item Cache — A Map keyed by playerId:slot:typeId|enchantments. An item is only processed again if it changes or loses its enchantments.

- Validated Application — Only enchants the item can actually hold are applied, so there are no failed attempts.


CONFIGURATION

Type /ae:menu in chat to open your personal settings panel.

 

- Custom Command — Registered via customCommandRegistry on system.beforeEvents.startup, so it supports autocomplete and works even with cheats disabled. No custom item or entity required.

- Per-Player Persistence — Your preferences (like choosing Smite over Sharpness) are saved via player.setDynamicProperty(), so they persist across sessions.

- Item Toggles — Don't want your tools auto-enchanted? You can disable it here!

NEW IN VERSION 1.1.0:

- Enchant Blacklist — Blacklist an enchantment you don't want from auto enchant specifically.

And DON'T FORGET to submit to save your settings!


TECHNICAL SPECS

Type : Behavior Pack (Script)

Min Engine Version : 1.21.20

@minecraft/server : 2.6.0

@minecraft/server-ui : 2.0.0


HOW TO INSTALL

1. Download the .mcpack file.

2. Import to Minecraft.

3. In your world settings, activate the behavior pack.

The Hold To Enchant — Auto Enchant Team

profile avatar
Owner
  • 41
    Followers
  • 9
    Projects
  • 760.3K
    Downloads