Magic NPCs: FAQ and Troubleshooting
On this page (4)
Installation and dependencies
Magic NPCs loaded, but no /magicnpcs commands exist and nothing casts.
Magic NPCs soft-depends on Iron’s Spells ‘n Spellbooks so it never crashes when Iron’s is absent. Install Iron’s Spells ‘n Spellbooks (1.20.1-3.15.x–1.20.1-3.16.x) along with GeckoLib, Curios API, PlayerAnimator, and (for 3.16.x) Iron’s Lib (irons_lib).
Does Magic NPCs need to be installed on both client and server?
Yes. Both sides register the magicnpcs:school_tome item and recipes, and magicnpcs-server.toml syncs from the server to connecting clients.
Where do my config edits go? I edited config/magicnpcs-server.toml and nothing changed.
Server settings do not live in config/. They live per world at saves/<world>/serverconfig/magicnpcs-server.toml (single-player) or <level-name>/serverconfig/magicnpcs-server.toml (dedicated server). Only magicnpcs-common.toml lives in config/. Put shared server defaults for new worlds in defaultconfigs/magicnpcs-server.toml.
Vanilla mobs, villagers, and NPCs
Why don’t skeletons or witches cast after installing Magic NPCs?
Vanilla hostile mobs do not cast out of the box. You must opt them in with a datapack loadout in data/<your_pack>/spellcasters/. Copy skeleton.json or witch.json into a datapack and run /reload.
My datapack loadout isn’t showing up in /magicnpcs validate at all.
Check three things:
- Your pack has a valid
pack.mcmetawith"pack_format": 15. - The folder is named
spellcasters(plural) directly underdata/<namespace>/spellcasters/*.json. /datapack listshows your datapack enabled. If Magic NPCs never receives the file from Minecraft’s resource manager,validatecannot list it.
Why did /magicnpcs validate say SKIPPED (mod absent)?
That is informational, not an error. The file targets an entity type, profession, or spell namespace from a mod that is not currently installed. Once that mod is added, the loadout activates automatically.
My Cleric villager has a Holy school, why won’t it shoot spells at zombies?
Vanilla villagers have no combat targeting AI — not even during raids. A magic villager only uses support spells (such as heal) unless another mod grants it combat targeting or you enable schools.villagers.selfDefense = true in magicnpcs-server.toml.
How do I stop a single NPC from casting, or undo a School Tome click?
Sneak-right-click the NPC with a School Tome until it cycles past the last school into stopped casting (MANUAL_DISABLED), or run /magicnpcs school clear <targets>. To hand an NPC back to automatic datapack/school assignment, run /magicnpcs school auto <targets>.
Casting behavior and spells
My mob casts magic_missile, why are fireball or add-on spells skipped?
- Check
/magicnpcs validateand/magicnpcs why <targets>. - If the spell belongs to an Iron’s add-on, it starts
UNVERIFIEDand is skipped unless declared in a spell manifest (data/<ns>/spell_manifests/*.json),spells.capabilityOverrides,spells.trustedNamespaces, orspells.allowUnverifiedSpells = true. See Iron’s add-ons guide. - If
/magicnpcs whyreports[FRIENDLY_FIRE], an ally, owner, villager, iron golem, or tamed pet is insidesafety_radius. - If a spell is marked
UNSUPPORTED(such asteleport,recall,burning_dash,spectral_hammer,touch_dig), Iron’s requires player/internal casting hooks that foreign mobs cannot supply.
I set "windup": 0, why does gravity_fissure or root still take time to charge?
windup only controls Magic NPCs’ pre-cast aim delay before Iron’s starts casting. To shorten or lengthen Iron’s native LONG/CONTINUOUS charge time, set "cast_time" (absolute ticks) or "cast_time_multiplier" (for example 0.5) on that spell entry.
I raised cooldown_multiplier and my mob started casting slower instead of faster!
cooldown_multiplier multiplies the cooldown duration, not cast frequency: 2.0 doubles the wait time; 0.5 halves it. For exact control, prefer "cooldown": <ticks> (20 ticks = 1 second).
Why is my caster still running into melee range instead of staying at range?
By default ("native_attack": "coexist"), Magic NPCs leaves the mob’s own AI alone. Set "native_attack": "suppress" in the loadout to hold native melee/ranged attack goals inert and activate CasterMovementGoal. If /magicnpcs why <targets> lists candidate attack goals not matched, add that goal’s class name to general.suppressibleAttackGoals or a matching regex to general.attackGoalNamePatterns.
My modded mob has a loadout, why does /magicnpcs why show [GOAL_NOT_EVALUATED] or [BRAIN_AI]?
Some modded mobs use Minecraft’s Brain/SmartBrainLib behaviour system or custom AI loops instead of running GoalSelector. If goal heartbeat grows past 40 ticks, the mob’s AI is not ticking vanilla goals. Include the /magicnpcs why output when reporting compatibility with that mob mod.
My NPC’s max_mana is lower than what I configured ([MANA_CLAMPED]).
Another mod (or vanilla attribute cap) is clamping irons_spellbooks:max_mana. Install AttributeFix or raise the attribute maximum in Apothic Attributes.
Reporting a bug
When opening an issue, run these commands in-game and attach their output along with logs/latest.log and your mod versions:
/magicnpcs config
/magicnpcs validate
/magicnpcs why @e[type=minecraft:skeleton,sort=nearest,limit=1]
Replace the @e[...] selector with the specific mob having trouble, and include your datapack JSON if the issue involves a custom loadout or spell manifest.