MonitoringMinecraft MonitoringMinecraft

Origins JS

Мод NeoForge

Мод для Майнкрафт: интеграция KubeJS с Origins.

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

Origins JS

This is a KubeJS integration for Origins (NeoForge), allowing you to manage origins and powers via KubeJS.

Note: This is my first time to make a KubeJS addon, most code written by DeepSeek and reviewed by my self. So if you think some APIs are weird or not well-designed, please let me know.

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.
  • Parameters Support: Pass custom parameters from JSON to your JS callbacks for dynamic behavior and high reusability.
  • PowerHelper Integration: Exposes the new PowerHelper API for power querying (hasActive, toggle) and advanced power data (Resource, Cooldown, EntitySet).

Dependencies

Quick Start

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

2. Basic Usage

// Recommended: use HelperWrapper (backed by new PowerHelper API)
let helper = OriginsJS.getHelper(event.player);

// Grant / revoke power & manage origin (HolderWrapper still works too)
let holder = OriginsJS.getHolder(event.player);
holder.grantPower("origins:origin", "origins:fire_immunity");
holder.setOrigin("origins:origin", "origins:human");

// Active state
helper.anyActive();                        // any power active?
helper.hasActive("origins:climbing");      // specific power active?
helper.toggle("primary");                  // toggle by key

// Execute callback on active powers
helper.execute("origins:climbing", (holderRef, power) => {
    holderRef.getEntity().tell("Climbing!");
});

// Modify base value (for modifier powers)
let modified = helper.modifyDouble("origins:modify_attribute", 10.0);

// Resource / Cooldown / Entity Set (also on helper)
helper.setResource("origins:climbing", 20);
helper.startCooldown("origins:fireball");
helper.addToEntitySet("mypack:friends", event.player.getStringUuid());

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

Documentation

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

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

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

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

SkyBars
SkyBars Java + BE
1161 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
MineLandy
MineLandy Java + BE
97 онлайн
1.12.2 — 26.1.2 версия
Ванила и анархия без приватов — полная свобода действий и честное выживание
beesmp
beesmp Java
1 онлайн
26.2 — 1.21.11 версия
Bee smp-улей,где каждый оставляет свой след
WahaCraft
WahaCraft Лаунчер
1 онлайн
Кланы | Боссы | RPG | Уникальная карта | PVP | Захват территорий | ВАРХАММЕР
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.16.5. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат