Skip to content

Developer Documentation

JohnSmith474 edited this page Sep 21, 2026 · 2 revisions

Welcome to the Developer Documentation for Enchantment Core! This chapter is written specifically for modders, datapack creators, and server administrators who want to build custom, data-driven content using the library's advanced features.

Enchantment Core is designed to significantly reduce the friction of creating complex, highly configurable enchantments across multi-loader environments. It provides native integration with Config Overhauled, a powerful spatial evaluation engine (the Spell Field API), and extensive Data Generation support.

This chapter covers the following core topics:

Learn about the specialized configuration categories designed for developers.

  • Debug & Spell Field Renderer: How to enable and customize the in-game visualizer for testing complex spatial topologies and bounding volumes.
  • The Orphanage: Understanding the failsafe mechanism that protects your datapacks from crashing when dynamic configuration dependencies are missing.

A comprehensive, step-by-step guide to generating your enchantments programmatically. This section covers how to establish a Single Source of Truth for a multi-loader workspace (Fabric, Forge, NeoForge), how to structure your enchantment definitions cleanly in Java, and the specific workflow required to inject dynamic Config Overhauled wrappers into your generated output.

The definitive guide to the Spell Field API. This system abstracts complex Area of Effect (AoE) logic, spatial mathematics, and multi-target evaluation into a declarative JSON structure. Explore how to define spatial Volumes and Topologies, and discover the extensive libraries of modular Entity, Block, Volume, and Visual effects that you can piece together to create anything from simple explosions to localized black holes and healing auras.

Learn how to decouple your spell fields from instant, single-tick execution. This section explains the SpellFieldAnchorEntity, the invisible backbone used to create lingering Areas of Effect. Discover how to configure precise temporal lifecycles, including activation delays, tick rates, and oscillating active/rest phases for complex pulsing magic.

Dive into the developer-facing Java registries designed for deep client-side customization.

  • Custom Anchor Rendering: Learn the delegation pipeline used to bypass default 2D sprites and attach complex 3D geometry or custom shaders to your spell field anchors.
  • Tooltip Formatting: Bypass rigid vanilla tooltip limitations. Use the TooltipFormatterRegistry to intercept, rewrite, and format enchantment tooltips to support custom lore and RPG-style progression visuals.

Clone this wiki locally