Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e88e742
feat(box3js): 新增独立脚本引擎模组(NeoForge 1.21.1)
ifishcool Apr 29, 2026
11725de
docs(box3-api): 更新 API 文档并重构命名空间;refactor(box3js-entity,box3js-player…
ifishcool Apr 30, 2026
c31a30e
feat(api): 新增游戏规则及扩展世界 API 至 Box3 API 映射文档
ifishcool Apr 30, 2026
fe88a61
feat(commands): 为脚本命令消息添加国际化支持
ifishcool Apr 30, 2026
ca9bb73
feat(voxels,entity,player,world): 添加 GameVector3 参数重载方法及多项功能增强
ifishcool Apr 30, 2026
64c4fc6
feat(script): 为 app.js 位置添加回退机制
ifishcool Apr 30, 2026
2274b12
docs(api): 更新实体属性方法并新增 getOpLevel
ifishcool Apr 30, 2026
e9dcde5
feat(api): 新增 player.dialog 方法用于模态对话框
ifishcool Apr 30, 2026
11990b8
feat(readme): 更新文档,增加 TypeScript 支持和改进的项目结构
ifishcool Apr 30, 2026
55d5785
feat: 移除 eval 命令并增强 TypeScript 模板
ifishcool May 6, 2026
a493499
feat(script): 增强项目创建功能,添加可点击路径并改进命令
ifishcool May 6, 2026
c747ddd
docs(api): 更新命令文档并将 data 目录重命名为 storage
ifishcool May 6, 2026
92e5001
feat(api): 添加沙箱模式和二段跳功能
ifishcool May 6, 2026
f76e7ee
feat(types): 为 GamePlayer 接口添加玩家生命属性
ifishcool May 6, 2026
b35e336
feat(player): 为 Box3JSPlayer 添加生命值管理方法
ifishcool May 6, 2026
5f0f09d
docs(readme): 更新 README,增强项目描述并简化内容
ifishcool May 6, 2026
5cd3816
docs(readme): 更新项目名称和命令文档
ifishcool May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"permissions": {
"allow": ["Bash(./gradlew build *)"]
}
}
5 changes: 5 additions & 0 deletions Box3JS-NeoForge-1.21.1/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/* text eol=lf
src/generated/**/*.json text eol=lf
40 changes: 40 additions & 0 deletions Box3JS-NeoForge-1.21.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Gradle ###
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/**/build/

### IntelliJ IDEA ###
.idea/
*.iws
*.iml
*.ipr
out/
!**/src/**/out/

.run/

### Eclipse ###
.apt_generated
.classpath
.eclipse/
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/**/bin/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

### Minecraft Modding ###
run/
!**/src/**/run/
**/src/generated/**/.cache/
repo/
!**/src/**/repo/
95 changes: 95 additions & 0 deletions Box3JS-NeoForge-1.21.1/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This is an example neoforge.mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml

# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory

# A version range to match for said mod loader - for regular FML @Mod it will be the FML version. This is currently 2.
loaderVersion="${loader_version_range}" #mandatory

# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="${mod_license}"

# A URL to refer people to when problems occur with this mod
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional

# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory

# The modid of the mod
modId="${mod_id}" #mandatory

# The version number of the mod
version="${mod_version}" #mandatory

# A display name for the mod
displayName="${mod_name}" #mandatory

# A URL to query for updates for this mod. See the JSON update specification https://docs.neoforged.net/docs/misc/updatechecker/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional

# A URL for the "homepage" for this mod, displayed in the mod UI
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional

# A file name (in the root of the mod JAR) containing a logo for display
#logoFile="examplemod.png" #optional

# A text field displayed in the mod UI
#credits="" #optional

# The authors of the mod, displayed in the mod UI (optional)
authors="神岛实验室"

# The description text for the mod (multi line!) (#mandatory)
description='''
Box3JS 为 Minecraft 服务端引入 JavaScript 脚本运行时,支持约 100 项 Box3 API 与 90 余项 Minecraft 扩展 API。无需 Java 基础即可编写服务端脚本。
'''

# The [[mixins]] block allows you to declare your mixin config to FML so that it gets loaded.
#[[mixins]]
#config="${mod_id}.mixins.json"

# The [[accessTransformers]] block allows you to declare where your AT file is.
# If this block is omitted, a fallback attempt will be made to load an AT from META-INF/accesstransformer.cfg
#[[accessTransformers]]
#file="META-INF/accesstransformer.cfg"

# The coremods config file path is not configurable and is always loaded from META-INF/coremods.json

# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.${mod_id}]] #optional
# the modid of the dependency
modId="neoforge" #mandatory
# The type of the dependency. Can be one of "required", "optional", "incompatible" or "discouraged" (case insensitive).
# 'required' requires the mod to exist, 'optional' does not
# 'incompatible' will prevent the game from loading when the mod exists, and 'discouraged' will show a warning
type="required" #mandatory
# Optional field describing why the dependency is required or why it is incompatible
# reason="..."
# The version range of the dependency
versionRange="[${neo_version},)" #mandatory
# An ordering relationship for the dependency.
# BEFORE - This mod is loaded BEFORE the dependency
# AFTER - This mod is loaded AFTER the dependency
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
side="BOTH"

# Here's another dependency
[[dependencies.${mod_id}]]
modId="minecraft"
type="required"
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"

# Features are specific properties of the game environment, that you may want to declare you require. This example declares
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
# stop your mod loading on the server for example.
#[features.${mod_id}]
#openGLVersion="[3.2,)"
63 changes: 63 additions & 0 deletions Box3JS-NeoForge-1.21.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Box3JS(神岛代码)-- Minecraft Mod

> **测试版(Beta)** — 本项目处于早期测试阶段,API 可能变动,可能存在未发现的缺陷。欢迎反馈问题。

[简体中文](README.md) | [English](README_en.md)

`Box3JS` 是一个 Minecraft 服务端模组,延续了神奇代码岛的代码风格。你无需编写 Java,只需使用 TypeScript 即可开发脚本。

## 特性

- **TypeScript 支持** — 项目模板内置 TS 类型声明,完整类型检查
- **Box3 API 兼容** — 实现了 Box3 平台核心 API(World / Entity / Player / Voxels / Storage)
- **MC 扩展** — 90+ Minecraft 独有功能:记分板、Bossbar、队伍、世界边界、粒子、烟花、药水等
- **热重载** — `/box3script watch` 重新加载,无需重启
- **项目管理** — 多项目隔离,独立启用/禁用,重启自动执行

## 快速开始

在游戏中(需要 OP 权限,等级 ≥ 2):

```
/box3script create mygame
```

这会创建一个 TypeScript 脚手架项目:

```
config/box3/script/mygame/
├── .gitignore
├── package.json ← npm 依赖(esbuild、Babel、TypeScript)
├── tsconfig.json
├── build.mjs ← 构建脚本(esbuild → Babel → Rhino)
├── types/
│ └── globals.d.ts ← Box3JS 完整类型声明
└── src/
└── app.ts ← 入口(含 Hello World 示例)
```

然后构建:

```bash
cd config/box3/script/mygame
npm install
npm run build # 输出 dist/app.js
```

回到游戏启用:

```
/box3script on mygame
```

## 可用 API

[API 总览 →](docs/api/README.md) ([English](docs/api/README_en.md))

## 命令

[命令详细参考 →](docs/api/commands.md) ([English](docs/api/commands_en.md))

## 许可证

Apache License 2.0
63 changes: 63 additions & 0 deletions Box3JS-NeoForge-1.21.1/README_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Box3JS -- Minecraft Mod

> **Beta** — This project is in early beta. APIs may change, and undiscovered issues may still exist. Feedback is welcome.

[简体中文](README.md) | [English](README_en.md)

`Box3JS` is a Minecraft server-side mod inspired by Box3 coding style. You don’t need to write Java — just use TypeScript to build scripts.

## Features

- **TypeScript Support** — The project template includes TS type declarations with full type checking
- **Box3 API Compatibility** — Implements core Box3 APIs (World / Entity / Player / Voxels / Storage)
- **Minecraft Extensions** — 90+ Minecraft-specific features: scoreboards, bossbars, teams, world border, particles, fireworks, potions, and more
- **Hot Reload** — Reload scripts with `/box3script watch` without restarting
- **Project Management** — Multi-project isolation, independent enable/disable, and auto-run on restart

## Quick Start

In-game (requires OP level ≥ 2):

```
/box3script create mygame
```

This creates a TypeScript scaffold project:

```
config/box3/script/mygame/
├── .gitignore
├── package.json ← npm dependencies (esbuild, Babel, TypeScript)
├── tsconfig.json
├── build.mjs ← build script (esbuild → Babel → Rhino)
├── types/
│ └── globals.d.ts ← full Box3JS type declarations
└── src/
└── app.ts ← entry point (includes Hello World example)
```

Then build:

```bash
cd config/box3/script/mygame
npm install
npm run build # outputs dist/app.js
```

Back in game and enable it:

```
/box3script on mygame
```

## Available APIs

[API Overview →](docs/api/README.md) ([English](docs/api/README_en.md))

## Commands

[Full Command Reference →](docs/api/commands.md) ([English](docs/api/commands_en.md))

## License

Apache License 2.0
Loading
Loading