HomeJavaModsOrigins JS (Legacy)
Origins JS (Legacy)

Origins JS (Legacy)

This is an official 1.20.1 backport of Origins JS (CurseForge | Modrinth) — a KubeJS integration for Origins (NeoForge), allowing you to manage origins and powers via JavaScript.

Features

Dependencies

Quick Start

1. Install all dependencies, then place your .js scripts in kubejs/server_scripts/.

2. Basic Usage

// Register a custom entity action
OriginsJS.registerEntityAction("heal_half", (entity, params) => {
    if (entity.isLiving()) {
        entity.heal(entity.getMaxHealth() / 2);
    }
});

// Create a custom power
OriginsJS.powerBuilder("regeneration_power")
    .tick((entity, params) => {
        if (entity.getHealth() < entity.getMaxHealth()) {
            entity.heal(0.5);
        }
    })
    .register();

Create kubejs/server_scripts/origins.js:

// Assign a random origin on first join
PlayerEvents.loggedIn(event => {
    let holder = OriginsJS.getHolder(event.player);
    if (holder && !holder.hasAllOrigins()) {
        holder.setOrigin("origins:origin", "origins:avian");
    }
});

3. Reference in JSON Datapacks

{
  "type": "origins_js:js_entity_action",
  "id": "heal_half"
}

See examples for more examples including custom actions, conditions, and powers.

Documentation

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more