Repository navigation
home_us
English · 中文
NekoJS is a Minecraft scripting mod. Write scripts in JavaScript (or TypeScript, or Python) to change recipes, react to game events, and add new items and blocks — no Java and no recompiling.
If you have used KubeJS, this will feel familiar: scripts live in your game folder, and one command applies your changes.
| You are… | Read first | Then |
|---|---|---|
| New to NekoJS | Quick start | Script basics |
| A modpack author changing recipes or adding items | Recipe system, Registering new content | Event reference, Global bindings |
| Using TypeScript or splitting code into files | TypeScript and JSX | Module system |
| Writing scripts in Python | Python scripts | Python feature support |
| Extending NekoJS with a Java plugin | Plugin development | Type adapters, Event extensions |
| Contributing to NekoJS itself | Project architecture | Build system |
If something goes wrong, check the FAQ. If you see a NEKO-xxxx code, look it up in the Error and log reference.
- Put NekoJS and its dependency Graal (25.1.3.7 or newer) in
mods/and start the game. - A
nekojs/folder appears in your game folder. Createnekojs/server_scripts/hello.js:
console.info('Hello, NekoJS!')- Enter a world, run
/nekojs reload, then openlogs/nekojs/server.log. The line is there.
For the full walkthrough — changing a recipe, adding an item, and turning on code completion — see Quick start.
| You want to… | Use | Details |
|---|---|---|
| Add, remove or change recipes | ServerEvents.recipes |
Recipe system |
| Add new items, blocks or entities |
RegistryEvents.register (startup scripts) |
Registering new content |
| Run code when players act, blocks break, and so on |
PlayerEvents, BlockEvents and other events |
Event reference |
| Add custom commands | CommandEvents.register |
Event reference |
| Draw a HUD or build screens |
ClientEvents, JSX screens |
Client rendering, JSX client UI |
| Get code completion in your editor |
/nekojs probe generates type declarations |
Probe type generation |
| Use pure-JavaScript libraries from npm |
import / require
|
Module system |
| Loader | Minecraft | Java |
|---|---|---|
| NeoForge | 1.21.1 | 21 |
| NeoForge | 26.1.2, 26.2.0 | 25 |
| Fabric | 26.1.2, 26.2 | 25 |
The Fabric builds run scripts, change recipes and support most common events, but some NeoForge-only features are missing. Read Platforms and compatibility before using Fabric. Downloadable versions are listed on Releases.
- 首页 / Home · 中文 · EN
- 平台与兼容性 / Platforms and compatibility · 中文 · EN
- 快速开始 / Quick start · 中文 · EN
- 配置参考 / Configuration · 中文 · EN
- 常见问题 / FAQ · 中文 · EN
- 脚本基础 / Script basics · 中文 · EN
- 脚本 API 约定 / Script API conventions · 中文 · EN
- 脚本属性 / Script properties · 中文 · EN
- 全局绑定 / Global bindings · 中文 · EN
- 数据、状态与持久化 / Data, state and persistence · 中文 · EN
- Python 脚本 / Python scripts · 中文 · EN
- Python 特性清单 / Python feature support · 中文 · EN
- 事件参考 / Event reference · 中文 · EN
- AI 辅助脚本编写 / AI-assisted authoring · 中文 · EN
- 命令 / Commands · 中文 · EN
- 错误与日志参考 / Error and log reference · 中文 · EN
- 客户端绘制与后处理 / Client rendering and post effects · 中文 · EN
- 版本化脚本包 / Versioned script packs · 中文 · EN
- 配方系统 / Recipe system · 中文 · EN
- 注册新内容 / Registering new content · 中文 · EN
- 模块系统 / Module system · 中文 · EN
- TypeScript 与 JSX / TypeScript and JSX · 中文 · EN
- JSX 客户端 UI / JSX client UI · 中文 · EN
- MixinJS(实验性) / MixinJS (experimental) · 中文 · EN
- Node.js 兼容 / Node.js compatibility · 中文 · EN