promotional bannermobile promotional banner

HexJSNeo

Adding game contents via KubeJS for base mod Hex Casting, including pattern actions, special handlers, iota types, and more.

HexJSNeo

Curseforge CurseForge
Modrinth Modrinth

Provides a way to create custom contents for Hex Casting via KubeJS.

A badge for addons.hexxy.media in the style of Devins Badges

Features

Core Concepts

  • Minimal efforts: auto registered great pattern tags, omit all optional args, pipe everything, …
  • Weak typed: ActionJS returns, ActionRegistryJS.of, etc.
  • Mutable is best: no registration event and phase limit, writing and reloading everywhere in startup scripts, we're writing JS \yay/
  • Clean global scope: everything under a single HexJS global object, no leaks

Game Content Registry

  • ActionJS: basis for all executables
    • customizable operate & operateInParens, with high degree-of-freedom return value handling
    • additional helper methods for creating operate varieties
    • assigning mediaCost to auto-attach media-cost side effect on operate, with preCheckMedia methods to help check & mishap before logics
  • ActionRegistryJS: registering certain patterns with actions
    • = Registry ID + Pattern prototype + inner ActionJS + Great-pattern marker (default false)
    • weak-typed constructor ActionRegistryJS.of(...): args in any order among its constructor, missing ones auto-filled (id from pattern signature, fresh ActionJS, false); only the pattern is required
    • transparent proxy of inner ActionJS: operate setters (setOperate & variants), mediaCost and preCheckMedia are callable directly on the registry object
    • great spells are auto-tagged with per-world / enlightenment tags
  • SpecialHandlerJS: taking an arbitrary pattern and retrieving its meanings
    • registers a JS tryMatch(pattern, env) factory consulted for every drawn pattern
    • SpecialHandlerJS.create(action, name) to help build a SpecialHandler, in which action could be another specially created ActionJS
    • chain setter setTryMatch for KJS-ish usage
  • IotaJS: highly customizable iota types
    • NBT-backed custom iotas: IotaJS.type(id) creates the type, containing CompoundTag iota data
    • overriding common iota interfaces (display, color, size, etc.) with either callbacks or constants
    • optional executability via setOperate, controlling its execution behaviors outside and inside parens
  • ArgsJS: basically a forwarder for various built-in Kotlin extension functions
    • used on a mutable iota list manually, or called from ActionJS.setOperateArgsSplit
    • typed getters (double, vec3, entity, …) with auto mishaps on missing args or wrong types
  • CastingEnvironmentComponentJS: vanilla but in JS, with more convenient Key creation
    • each component takes a key string as the first constructor arg, from which the Key is auto-created & cached (setKey to change it later)
    • usages and types same as vanilla
  • MishapJS: highly customizable mishap types
    • declaring the type using MishapJS.type() first, quite similar to IotaJS
    • calling type.create() or type.create(data) for a mishap of this type
    • KJS-ish piped methods to override all behaviors of created mishaps

QoL Features

  • Hot-swap everything
    • everything, simple as /kjs reload startup-scripts
    • covers: actions (entry action & prototype replaced in-place), special handlers, iota types
    • not for those haven't created on startup, but it's possible to match later-created pattern actions using a special handler :3
  • API & packages importer: HexJS.API & HexJS.APIFlat
    • exposes all Hex Casting classes scanned from the mod jar, either nested by package (HexJS.API.<...package>.<Class>) or flat (HexJS.APIFlat)

ProbeJS Typing Support

  • generates typings for the JS-facing API, including nested HexJS.API levels, fake-singleton classes flattened to static fields, and subclass members assigned onto their parents

The HexJSNeo Team

High Crafter tier frameprofile avatar
  • 5
    Followers
  • 10
    Projects
  • 1.0M
    Downloads

More from YukkuriCView all

  • HexOverpowered project image

    HexOverpowered

    as the name reveals, this mod contains some OP stuff for Hex Casting

    • 9.4K
    • August 30, 2026
  • HexAutomata project image

    HexAutomata

    Provide items with ability listening to various game events and triggering custom spells.

    • 3.0K
    • August 27, 2026
  • MnAOverpowered project image

    MnAOverpowered

    Another QoL addon containing small tweaks about easy gaming experiences for Mana and Artifice

    • 2.5K
    • August 22, 2026
  • HexParse project image

    HexParse

    Converts custom code into (pattern or literal) list iota by command; requires player to have a focus item in hand.

    • 12.9K
    • August 16, 2026
  • HexOverpowered project image

    HexOverpowered

    as the name reveals, this mod contains some OP stuff for Hex Casting

    • 9.4K
    • August 30, 2026
  • HexAutomata project image

    HexAutomata

    Provide items with ability listening to various game events and triggering custom spells.

    • 3.0K
    • August 27, 2026
  • MnAOverpowered project image

    MnAOverpowered

    Another QoL addon containing small tweaks about easy gaming experiences for Mana and Artifice

    • 2.5K
    • August 22, 2026
  • HexParse project image

    HexParse

    Converts custom code into (pattern or literal) list iota by command; requires player to have a focus item in hand.

    • 12.9K
    • August 16, 2026