PassiveSTJS exposes Passive Skill Tree through four script surfaces:
StartupEvents.registry('skilltree:...')for serializer-backed custom types.PassiveSTJSEvents.skillTreeContent(...)for managed tree and skill content generation.PassiveSkillTreeJSbindings for runtime inspection and mutation.event.recipes.skilltree.workbench_item_bonus()for PST workbench socket recipes.
Script Locations
Use each surface in the correct KubeJS folder:
kubejs/startup_scripts/ForStartupEvents.registry('skilltree:...').kubejs/server_scripts/ForPassiveSTJSEvents.skillTreeContent(...), runtime helper usage, and recipe registration.kubejs/client_scripts/ForClientEvents.lang(...)entries that provide titles, descriptions, tooltip fragments, and workbench text.
Main Entry Points
The public event and binding entry points are:
PassiveSTJSEvents.skillTreeContent(event => { ... })PassiveSkillTreeJS.player(player)PassiveSkillTreeJS.skill(id)PassiveSkillTreeJS.tree(id)PassiveSkillTreeJS.item(stack)
The content event writes generated JSON into KubeJS' virtual datapack and then applies it to PST runtime caches after the event posts.
Startup Registry Families
PassiveSTJS installs StartupEvents.registry(...) support for these PST serializer families:
skilltree:skill_bonusesskilltree:skill_bonus_multipliersskilltree:living_conditionsskilltree:damage_conditionsskilltree:item_conditionsskilltree:enchantment_conditionsskilltree:event_listenersskilltree:numeric_value_providersskilltree:skill_requirementsskilltree:item_bonuses
Inside skillTreeContent, event.registries() exposes the real PST registry view for the same families.
Typed Authoring
The addon ships typed ids and enums for the common PST paths used in scripts and recipes. The checked-in examples show this style directly:
- typed tree and skill ids
- typed registry ids for bonuses, listeners, requirements, conditions, and item bonuses
- typed equipment types, textures, frame types, logic enums, effect ids, attribute ids, item ids, tag ids, and potion ids
This is the intended authoring path when Probe or generated typings are available.
Docs Map
- Startup Registry Integration How custom serializer-backed PST types are registered.
- Server Content Event How trees and skills are added, edited, removed, or replaced.
- Runtime Helpers How player, tree, skill, and item helpers are used at runtime.
- Workbench Recipes
How
skilltree:workbench_item_bonusis authored through RecipeJS. - Config
What
passivestjs-common.tomlcontrols. - Examples Which checked-in sample file demonstrates which API surface.
Version Notes
- Minecraft:
1.20.1 - Forge:
47.4.18 - KubeJS:
2001.6.5-build.22 - Shared config:
config/passivestjs-common.toml