-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Config
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.
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.
To view the visualizers in-game:
- Set the
enable_debug_rendererproperty totrue. - Toggle Minecraft's entity hitbox visibility (typically
F3 + B).
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 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.
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:
-
Adoption: The
Orphanagecatches the unresolvableConfigDescription. -
Remapping: It automatically recreates and exposes the missing property within
EnchantmentCore's own configuration menu under theorphanscategory. -
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>
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
logsdirectory to the clipboard. -
Accessibility: The colors of this alert (text and clickable link) can be customized by the client under the
client -> accessibilityconfiguration group (alert_colorandlog_directory_link_color).
Want to learn more about the configuration engine powering Enchantment Core?
Check out Config Understood, the official wiki for Config Overhauled, for a deep dive into dynamic property generation and state synchronization!