Magic NPCs: Getting Started
On this page (5)
Magic NPCs lets mobs and NPCs cast spells from Iron’s Spells ‘n Spellbooks. Any entity type can become a spellcaster through a small datapack JSON file, while Villager Recruits, Villagers, Easy NPC, and CustomNPCs also support dedicated safety rules, progression scaling, and dynamic magic schools.
Magic NPCs soft-depends on Iron’s Spells ‘n Spellbooks and every supported NPC mod. It bundles no third-party classes or assets and loads cleanly if any optional mod is absent.
Requirements
Install on both the client and the server (for multiplayer):
| Mod | Requirement | Version (1.20.1) | Notes |
|---|---|---|---|
Minecraft |
Required |
1.20.1 |
— |
Minecraft Forge |
Required |
47.4.0+ (tested on 47.4.16) |
Required by Iron’s Spells 3.15+ |
Magic NPCs |
Required |
0.9.1 (modid: magicnpcs) |
Both sides |
Iron’s Spells ‘n Spellbooks |
Required for casting |
1.20.1-3.15.x – 1.20.1-3.16.x |
Manifest verified against 1.20.1-3.16.4; without Iron’s, Magic NPCs loads with casting disabled |
GeckoLib |
Iron’s dependency |
4.8+ |
Required by Iron’s Spells |
Curios API |
Iron’s dependency |
5.4.7+ |
Required by Iron’s Spells |
PlayerAnimator |
Iron’s dependency |
1.0.2-rc1+ |
Required by Iron’s Spells |
Iron’s Lib ( irons_lib) |
Iron’s 3.16.x dependency |
1.20.1-2.x |
Required when running Iron’s 3.16.x |
Villager Recruits |
Optional |
1.15.0+ |
Enables the compiled Recruits adapter and shipped recruit loadouts |
Easy NPC: Core ( easy_npc) |
Optional |
7.11.0 – <8.0 |
Enables the compiled Easy NPC adapter ( easy_npc_config_ui is optional) |
CustomNPCs (GBPort Unofficial) |
Optional |
1.20.1.20260711 |
Exact supported build; enables the CustomNPCs bridge and script API |
Other NPC mods (Guard Villagers, MCA Reborn, MineColonies, Human Companions, More Villagers, VillagersPlus) are supported through config-gated datapack loadouts with no hard dependency. See Compatibility.
Controls
Magic NPCs adds no custom keybinds. Player interaction uses the School Tome (magicnpcs:school_tome):
- Right-click an NPC — inspect its current magic school or active datapack loadout (action bar message).
- Sneak + Right-click an NPC — cycle through allowed magic schools that have castable spells; cycling past the last school marks the NPC as a non-caster (
MANUAL_DISABLED).
What happens out of the box
- Vanilla hostile mobs (skeletons, witches, zombies, etc.) do not cast spells by default. You opt them in with a datapack loadout (see Loadout examples and Pack authors).
- Villager Recruits (when installed) have shipped loadouts for
recruit,bowman,crossbowman, andcaptain, and can also roll automatic magic schools (schools.recruits.enabled = true,casterChance = 0.35). - Villagers (when
schools.villagers.enabled = true) can automatically roll a school matching their profession (cleric,librarian,weaponsmith,toolsmith,fletcher,farmerby default,casterChance = 0.5). Unemployed villagers (minecraft:none) are skipped until they take a job. Vanilla villagers stay peaceful and only use support heals unless another mod gives them combat targeting or you enableschools.villagers.selfDefense. - Easy NPC and CustomNPCs never roll random schools or accept datapack loadouts by default; both must be opted into in configuration.
Your first 10 minutes
- Confirm your setup. Launch your world with Forge, Iron’s Spells ‘n Spellbooks (and its dependencies), and Magic NPCs. If you have operator permissions, run
/magicnpcs configto confirm Iron’s and any NPC mods are detected. - Craft a School Tome. Surround a Book with 2 Arcane Essence (top/bottom) and 2 Blank Runes (left/right) on a crafting table, or pick it up from the Tools & Utilities creative tab. See School Tome and recipes for the exact crafting grids (including the vanilla fallback recipe).
- Inspect or assign a school. Find a Villager (such as a Cleric) or a Villager Recruit and right-click it with the School Tome to see whether it has a school or loadout. Sneak-right-click to cycle its magic school (
fire,ice,lightning,holy,ender,blood,evocation,nature, oreldritch) or to stop it from casting. - Watch a cast in combat. Summon or lead an enemy near an offensive caster (like a Recruit). Before an attack spell fires, the caster displays a school-coloured particle and sound telegraph during its wind-up, snaps its aim toward the target, and runs Iron’s full cast lifecycle (including channels on
LONGspells). - Make vanilla mobs cast (optional). Copy
skeleton.jsonorwitch.jsoninto<world>/datapacks/my_magic/data/my_magic/spellcasters/alongside apack.mcmeta("pack_format": 15), run/reload, and test against a Survival or Adventure target. - Diagnose anything unexpected. Run
/magicnpcs validateto inspect every loaded file and/magicnpcs why @e[type=minecraft:skeleton,sort=nearest,limit=1]to see why a specific mob is or isn’t casting right now.
Where to go next
- Read Casting and combat mechanics to understand mana, cooldowns, telegraphs, friendly-fire rules, and caster repositioning.
- Read Magic schools and Mob-friendly spells before designing encounters.
- Server owners and modpack authors should review Commands, Configuration, and Pack authors.