MonitoringMinecraft MonitoringMinecraft

Origins JS (Legacy)

Мод FabricForge

KubeJS integration for Origins. Backport from Origins JS

0 скачиваний 0 подписчиков
Оцените первым

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

  • Origin & Power Management — Grant, revoke, and check origins/powers from JS scripts.
  • Custom Actions — Define EntityAction, BlockAction, ItemAction, BiEntityAction in JavaScript.
  • Custom Conditions — Define EntityCondition, BlockCondition, ItemCondition, BiEntityCondition, BiomeCondition, DamageCondition, FluidCondition in JavaScript.
  • Custom Powers — Create fully scripted Power types with JS callbacks (grant, revoke, tick, active, inactive).
  • Data-Driven — All custom types can be referenced in JSON datapacks using the origins_js: namespace.
  • Parameter Support — Pass custom parameters from JSON to your JS callbacks for dynamic behavior.

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

  • API Reference — full type table and static shortcut methods
  • Examples — code examples for origins/powers, custom actions, conditions, and powers
Смотри также

Похожие подборки моды — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
189 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
Battle Mine
Battle Mine Java + BE
0 онлайн
1.21.4 — 26.2 версия
ОТКРЫТИЕ! 20 + различных ивентов, 10+ различных боссов, много интересных механник
AxisMine - ВаниллаPlus
6 онлайн
1.21.4 — 26.1.2 версия
Ванильный мир с сотнями уникальных механик и справедливой игрой! /free, pat-pat, emotecraft, Voice.
EVY-MC ЖДЕМ ИМЕННО ТЕБЯ
0 онлайн
1.21.1 — 1.21.11 версия
Уютное выживание с живой экономикой, голосовым чатом и 50 достижениями
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.21.8. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат