Spellcasting
Spellcasting is the core system of the magic content added by Iron's Spells 'n Spellbooks. A player casts spells from spellbooks, scrolls and magic implements such as staffs, swords and wands. Each cast spends mana, may hold the player in a cast for a set time, and then starts a cooldown. Spellcasting is the main way a player fights and defends against the pack's horror content, so mana, cast interruption and the nine spell schools decide how the mod plays.
Mana
Mana is a player attribute rather than a separate bar of its own. The base maximum is 100 (max_mana). Mana regenerates through the percent-based mana_regen attribute. The mana bar is drawn above the air bar and is shown contextually by default; the client option manaBarDisplay can be set to always show or hide it. The mana bar can be anchored to the XP bar, which hides the vanilla XP bar.
Players respawn with no mana by default (manaSpawnPercent = 0.0). Creative mana and creative cooldowns are off by default (creativeMana and creativeCooldowns are false).
Casting
A player casts the selected spell by holding right-click on a casting implement, or by pressing the spellbook cast key. While a cast is running, right-clicking any other item is cancelled. Spells are selected in three ways:
- the spell bar, a row of slots above the XP bar;
- the spell wheel, opened with its own key;
- quick-cast keys, fifteen bindings grouped into two spell groups.
While casting, the player is slowed. The base movement input multiplier is 0.2, and the Casting Movespeed attribute changes it. The cast bar is drawn below the crosshair and the recast bar above the XP bar. Cooldowns and recasts are tracked per player.
Cast types
Every spell has one of three cast types:
| Type | Behaviour |
|---|---|
| Instant | The spell fires at once and the player does not hold a cast. |
| Long | The player holds the cast for the spell's cast time. Right-click input is suppressed for the duration. |
| Continuous | The spell keeps running for as long as the cast is held. Right-click input is suppressed for the duration. |
Interruption
A cast is cancelled when any of the following happen:
- the player takes damage, unless the damage type is in the
LONG_CAST_IGNOREtag or the damage is a marked poison tick; - the player opens any container screen;
- the player changes a piece of equipment that is a spell container or a casting implement;
- the player changes dimension, logs out or dies.
Tossing a continuous-cast scroll during a cast removes one scroll from the stack.
Spell values
Each spell's values are set in datapack-driven configs: mana cost, cooldown, power multiplier, minimum rarity, enabled flag and whether the spell can be crafted. These configs reload when the datapack syncs. The server config file holds only the global toggles, such as spellGriefing, which is false by default, so spells do not destroy terrain or set fires unless it is enabled. See the school pages for the individual spells.
Spellbooks and scrolls
A spellbook is a spell container with a set number of spell slots. Spell-slot upgrades add slots; see Upgrade Orbs. Spellbooks come in several tiers, from the wimpy and evoker books up to the netherite and diamond books, along with specialist books such as the ice spell book and the bloody vellum. See Spell Books.
A scroll holds one spell and comes in unlearned and learned forms. See Scrolls. Scrolls can be merged with ink in the Arcane Anvil to upgrade their rarity and level, which is on by default (scrollMerging = true). Spellbooks, furled maps and the chained book are accepted by vanilla bookshelves and lecterns. Wisewood bookshelves also count as enchantment power providers.
Spell rarity and levels
Spells are rated from common to legendary, and ink comes in the same five rarities. Ink is used in scroll merging and in some Create recipes.
Schools and resistance
The mod has nine schools: fire, ice, lightning, holy, ender, blood, evocation, nature and eldritch. Each has its own page: Fire Spells, Ice Spells, Lightning Spells, Holy Spells, Ender Spells, Blood Spells, Evocation Spells, Nature Spells and Eldritch Spells.
Every entity has a magic resistance attribute for each school, plus a spell power attribute and a spell resist attribute. Mobs get default values from their tags. Undead mobs have 0.5 holy resistance and 1.5 blood resistance. Fire-immune mobs have 1.5 fire resistance. Blazes have 0.5 ice resistance. Victims of impalers have 0.5 lightning resistance.
Imbued weapons
Swords imbued with a spell act as casting implements, as do staffs and wands. An imbued sword consumes mana when it casts (swordsConsumeMana = true by default), and its cooldown is multiplied by 0.5 (swordsCooldownMultiplier = 0.5). See Staffs.
Magic jewelry
Rings, amulets and charms use the Curios necklace, ring and spellbook slots. The spellbook item cannot be placed in the generic curio slot. Several rings change mana, cooldown or cast time. See Rings, Amulets and Charms.
Effects and summons
Spells and magic items apply status effects such as Evasion, Charged, Hastened and Slowed. See Iron's Spellbooks Effects. Summons, such as vexes, polar bears and summoned swords, are allied with their summoner. Their damage scales with the summoner's summon damage attribute. See Summoned Creatures.
Fear Nightfall changes
Iron's Spells loot now reaches the chests that the pack maps to vanilla chest loot, so spellbooks, scrolls and magic items appear in the same chests as other pack loot.
Several hostile casters are relevant to spellcasting. Necromancer spawns as a monster in all overworld biomes. Ice Spider patrols can start during rain in snowy and icy biomes, roughly half the time a patrol roll is made. Patrols are disabled by the iceSpiderPatrols setting.
The ominous Tyros fight is off by default (tyrosOminousEnabled = false). The Dead King is an ominous boss that is triggered by a Bad Omen or Trial Omen effect within range.
Tips
Keep mana full before going into the horror biomes, because the spells used to fight there depend on it. Learn the spell wheel and quick-cast keys, so a spell can be picked without opening the inventory during a fight. Any damage taken during a cast interrupts it, so cast from cover where possible.