Skip to content

Developer Config

JohnSmith474 edited this page Sep 21, 2026 · 1 revision

The EnchantmentCore configuration registry includes specific categories designed to assist developers and modpack creators in debugging complex data-driven mechanics and handling missing dependencies gracefully.

This document covers the Debug and Orphanage configuration categories.


Debug & Spell Field Renderer

The debug category, specifically the renderer group, contains client-side properties used to visualize the complex mathematical bounds and topologies of the Spell Field API.

Because Spell Fields evaluate abstract geometric volumes (Cuboids, Spheres, Deep Cuboids) and topologies (Euclidean, Polynomial falloffs), visualizing them is critical for fine-tuning enchantment effects.

Enabling the Renderer

To view the visualizers in-game:

  1. Set the enable_debug_renderer property to true.
  2. Toggle Minecraft's entity hitbox visibility (typically F3 + B).

Rendering Properties

The debug renderer provides extensive color customization to help differentiate overlapping vectors, planes, and grid points.

Note: Colors are defined as hexadecimal integers. Pay attention to whether a property accepts standard RGB (6-digit) or ARGB (8-digit, including alpha/transparency).

General

  • render_retention_ticks (Integer, 1 - 1200): Defines how long (in ticks) transient spell field debug visualizers persist on the screen after an enchantment triggers them. Default: 60.

Bounding Volumes

  • bounding_box_color (ARGB): The color of the hard volume boundaries.
  • topology_plane_color (ARGB): The color and transparency of topology plane surfaces.
  • topology_sphere_color (ARGB): The color and transparency of omnidirectional topology spherical wireframes.

Origin & Axes

  • origin_x_color (RGB): The color of the X-axis (Right/Left) on the origin crosshair.
  • origin_y_color (RGB): The color of the Y-axis (Up/Down) on the origin crosshair.
  • origin_z_color (RGB): The color of the Z-axis (Forward/Backward) on the origin crosshair.
  • axis_line_color (RGB): The color of the explicit topology axis direction line.

Vectors & Grid Points

  • field_point_high_color (ARGB): The color of volumetric grid points where the calculated topology multiplier is at maximum strength (1.0).
  • field_point_low_color (ARGB): The color of volumetric grid points where the calculated topology multiplier is at minimum strength (0.0).
  • vector_stem_color (ARGB): The color of the directional vector stems (e.g., impulse paths).
  • vector_tip_color (ARGB): The color of the directional vector arrowheads.

The Orphanage

The Orphanage is a failsafe mechanism implemented via the OrphanHandler interface. It protects datapacks and servers from catastrophic failure when a dynamic configuration wrapper points to a missing dependency.

How it Works

When a datapack utilizes a Config Overhauled wrapper that targets a mod_id which is currently unloaded or lacks a registered ConfigManager (and no valid fallback is defined), the system intervenes:

  1. Adoption: The Orphanage catches the unresolvable ConfigDescription.
  2. Remapping: It automatically recreates and exposes the missing property within EnchantmentCore's own configuration menu under the orphans category.
  3. Structure: The adopted property preserves its original namespace mapping to prevent collisions, structured as: enchantment_core:orphans.<original_mod_id>.<original_category>.<original_group>.<original_property>

In-Game Notifications

To ensure server administrators and developers are aware of missing dependencies, the Orphanage features an alert system:

  • When an orphaned property is adopted, an error is immediately printed to the server console.
  • Players logging in with operator privileges (Permission Level 2+) will receive a customized chat alert notifying them of the adopted properties.
  • On integrated servers (single-player/LAN), this alert includes a clickable component to instantly copy the absolute path of the logs directory to the clipboard.
  • Accessibility: The colors of this alert (text and clickable link) can be customized by the client under the client -> accessibility configuration group (alert_color and log_directory_link_color).

Clone this wiki locally