跳到正文

NekoJS

作者:Tki_sor

Use modern JavaScript to modify recipes and handle events.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

NekoJS – Modern Minecraft Scripting Engine

A powerful, fast, and elegant Minecraft modding engine powered by NeoForge and GraalVM.

NekoJS is a next-generation Minecraft scripting runtime that goes beyond simple JavaScript execution. It provides pack makers and mod developers with an exceptional development experience that rivals modern frontend engineering.


Core Features

High-Performance Engine

  • GraalVM Powered: Blazing-fast execution speeds.
  • Modern Standards: Full support for modern ECMAScript.
  • Legacy-Free: Say goodbye to outdated Rhino or Nashorn engines.

TypeScript and JSX Support (NekoSWC)

  • Write .ts and .tsx files directly.
  • Zero-Config: No complex build pipeline configuration needed.

Modern Module System

  • CommonJS Support: Full require() and module.exports support.
  • Node-style Resolution: Native Node.js module resolution logic.
  • NPM Integration: Use npm to install pure JavaScript libraries directly into your nekojs folder.

Quick Start

1. Write a Module (utils.ts)

// server_scripts/utils.ts

function calculateDamage(base: number, multiplier: number): number {
    return base * multiplier;
}

const MOD_NAME: string = "NekoJS";

module.exports = {
    calculateDamage,
    MOD_NAME
};

2. Main Logic with Events (main.ts)

// server_scripts/main.ts

const { calculateDamage, MOD_NAME } = require('./utils.ts');

console.log(`[${MOD_NAME}] Loading custom logic...`);

ServerEvents.tickPre(event => {
    // Your tick logic here
});

In-Game Tools

Built-in Code Editor

  • Integrated IDE: Full-featured code editor accessible within Minecraft.
  • Developer Friendly: Syntax highlighting and real-time error tracking with stack traces.
  • File Management: Built-in file browser.

Ecosystem Extensions

  • NekoSWC: Unlocks full TypeScript and JSX/TSX capabilities with a Rust-powered compilation engine for millisecond-level transpilation.
  • NekoProbe: Provides type declarations for IDE intelligent code completion and an enhanced development experience.

Requirements

  • Minecraft: 1.21.1+
  • NeoForge: 26.1.2+
  • Graal Mod: Download Here (Required dependency)

Contributing

NekoJS is actively developed! We welcome bug reports, feature suggestions, and pull requests.


Transform your Minecraft experience with the power of modern JavaScript.

常见问题

NekoJS 支持哪些 Minecraft 版本?

NekoJS 支持 Minecraft Java 版 1.12.2–26.2,共 6 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

NekoJS 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Tki_sor 的其他作品

查看全部 →