HomeJavaModsIron's Spells 3D Cast Preview
Iron's Spells 3D Cast Preview
ModsJava

Iron's Spells 3D Cast Preview

by _p1nero · on Modrinth

⬇ Download on Modrinth

Iron's Spell Scroll Ponder

Iron's Spell Scroll Ponder adds an interactive spell preview to scrolls from Iron's Spells 'n Spellbooks. Hover a valid spell scroll and hold Ponder's configurable key (W by default) to open a live preview.

Instead of maintaining a hand-authored scene for every spell, the mod casts the selected spell on a server-side simulated player in an isolated preview dimension. Entities, blocks, particles, sounds, cast state, and selected Iron's Spellbooks client packets are projected into a Ponder virtual level. This gives built-in spells and many add-on spells a useful preview without per-spell scene code.

Add-on Compatibility

Most Iron's Spellbooks add-ons work automatically because this mod discovers their registered spells through SpellRegistry and executes the real spell on a server-side simulated player. It then projects the resulting entities, particles, sounds, block changes, cast state, and reviewed visual packets into the Ponder scene. An ordinary add-on spell that uses Iron's standard casting and world APIs does not need a dedicated integration.

Complex spells may require an adapter when their important behavior happens after the initial cast, such as a recast, a later physical attack, an effect removal callback, or another gameplay interaction. Add-on authors can register a server-side SpellPreviewAdapter during common initialization:

SpellPreviewAdapters.register(
        ResourceLocation.fromNamespaceAndPath("your_mod", "complex_spell"),
        new SpellPreviewAdapter() {
            @Override
            public void onCastCompleted(SpellPreviewContext context) {
                // Prepare any state required by the follow-up demonstration.
            }

            @Override
            public Action tickAfterCast(SpellPreviewContext context) {
                if (context.ticksSinceLastCast() == 12) {
                    context.performPhysicalAttack(1.0F);
                }
                return context.ticksSinceLastCast() >= 20 ? Action.COMPLETE : Action.WAIT;
            }
        });

The adapter lifecycle also provides onSceneReady, beforeRecast, and onSessionClosed, while SpellPreviewContext exposes bounded helpers for common interactions. Return false from allowsSimulation for spells that cannot be isolated safely, such as persistent portals or cross-dimension travel. Custom client-only packets are not automatically trusted: prefer standard entity, particle, sound, and block APIs, or contribute a narrowly reviewed projection handler for that packet. See SpellPreviewAdapter and SpellPreviewContext for the complete API.

Features

Requirements

Iron's Spellbooks and its normal runtime dependencies are still required. Install this mod on both the client and server.

Usage

  1. Open an inventory screen and hover a valid Iron's Spellbooks scroll.
  2. Hold the Ponder key shown in the tooltip.
  3. Drag to rotate the scene, use the mouse wheel to zoom, and use the movement keys shown by the interface to pan the camera.
  4. Use Replay to rebuild and cast the current spell again.
  5. Click the scroll icon to search for and preview another enabled spell.
  6. Press Escape or close the screen to end the server preview session.

The Ponder key can be changed in Minecraft's key bindings. The generated config/iss_ponder-client.toml file also provides tooltip.showScrollSpellDescription; set it to false to stop adding the spell's guide description to scroll tooltips without disabling the preview prompt.

Safety and Compatibility

Spell code is executable mod code, so automatic compatibility can never be absolute. The preview limits a cast to 15 seconds and isolates each player in a distant cell of iss_ponder:spell_preview. The built-in pocket_dimension, recall, and portal spells are information-only because they can change dimensions or persistent world state.

Add-on spells that depend on a biome, structure, block interaction, real player inventory, or a second gameplay action may need a dedicated adapter. Custom client packets also require explicit review before they are replayed in the virtual level.

The project includes dedicated follow-up adapters for multi-stage, recast, reactive defense, and subsequent-projectile mechanics. See SPECIAL_SPELLS.md for the test matrix and TECHNICAL_NOTES.md for the verified architecture, source references, and upgrade checklist.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more