Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
Stellar Enchants
A custom enchantment plugin for Paper 1.21.x
It adds three shift-activated tool enchantments that obtain via the enchanting table (best odds at the 30-level slot), villager trades, and the /stellarenchant command.
โจ Enchantments
Enchantment Tool Effect Vein Miner Pickaxe Mines an entire connected ore vein. Each extra block consumes one point of tool durability. Tree Capitator Axe Chops down a whole tree and automatically replants a matching sapling where it stood. Smelt Touch Pickaxe Ores drop their smelted ingot/result instantly (iron, gold, copper, ancient debris, โฆ). Overrides Silk Touch; compatible with Fortune. Important: all three effects only trigger while the player is sneaking (holding Shift). Normal mining is never affected, so you won't accidentally blow up a vein or fell a tree. Each enchanted tool's lore reminds the player: "Shift and mine to โฆ".
Smelt Touch + Vein Miner stack on the same pickaxe โ shift-mining one iron ore breaks the whole vein and smelts every block into iron ingots.
Enchantment compatibility
Smelt Touch โ Silk Touch โ mutually exclusive. Smelt Touch always smelts the ore, so Silk Touch can't be added to a Smelt Touch tool (and vice-versa) via command, anvil, or the enchanting table. Smelt Touch โ Fortune โ fully compatible. Fortune multiplies the smelted output for iron, gold and copper ores (so a Fortune pickaxe yields extra ingots), plus coal/diamond/emerald/redstone/lapis/quartz which keep their normal vanilla Fortune drops. Ancient Debris is excluded โ Fortune never multiplies netherite scrap. Tree replanting Tree Capitator replants a sapling on every base trunk column. For the four 2ร2 trees (jungle, dark oak, spruce, acacia) it restores all four saplings so the giant variant can regrow, instead of just one.
๐ฎ Command
text
/stellarenchant <enchantment> [level] Aliases: /se, /stellarenchants Permission: stellarenchantment.enchant (default: OP) Applies the chosen enchantment to the item held in your main hand. <enchantment> is one of: veinminer, treecapitator, smelttouch (tab-completion is provided). Examples:
/stellarenchant veinminer /se treecapitator /se smelttouch The command validates the tool type โ e.g. Tree Capitator can only go on an axe, Vein Miner / Smelt Touch only on a pickaxe.
๐ฆ Obtaining enchantments in survival
Enchanting Table โ eligible pickaxes/axes and books can roll a Stellar enchantment. The chance scales with the chosen slot and is highest at the 30-level enchant, exactly as requested. Books can roll any of the three enchants. Enchanted Books โ books carry Stellar enchants with full lore + glint. Create one with the command on a held book, roll one from the enchant table, or trade for tools that already have the enchant. Villager Trades โ Toolsmith villagers may sell pre-enchanted pickaxes (Vein Miner / Smelt Touch) and Weaponsmith villagers may sell axes (Tree Capitator), purchasable for emeralds. Command โ see above (admins / creative). Works on tools and books. ๐จ Anvil & Grindstone Anvil โ combine Stellar enchants like vanilla: Book โ Tool: apply a Stellar book's enchant to a matching tool. Tool โ Tool (same type): merges, keeping the higher level of each shared enchant. Book โ Book: merges two enchanted books. A vanilla-style XP level cost is charged (scales with what transfers); survival players who can't afford it can't take the result. Enchants only land where they belong (e.g. Vein Miner won't apply to an axe). Grindstone โ strips all Stellar enchants from an item, just like it removes vanilla enchants. A disenchanted book reverts to a plain book.
๐งฑ How it works (technical)
Enchantments are stored in each item's PersistentDataContainer (PDC) as integers keyed under stellarenchants:enchant_<id>. This is fully version stable and never collides with vanilla enchantment registries (which changed heavily in 1.20.5+). The visible lore is rebuilt from the PDC whenever an enchantment is added or removed. The plugin tracks how many leading lore lines it owns via a PDC counter (stellarenchants:lore_lines) and strips exactly those on refresh โ so it never disturbs other plugins' lore and never writes a stray marker glyph into the text (this fixes the unsupported-character icon some clients rendered). Enchanted items receive the enchanted glint via setEnchantmentGlintOverride. Cascading block breaks are fired as real BlockBreakEvents (so land-claim / protection plugins like WorldGuard still apply), with a re-entrancy guard to prevent infinite recursion. A hard cap of 256 blocks per activation keeps performance safe. Tool durability respects the vanilla Unbreaking enchantment.


