TeamOccultus/StarTenonAPI
6
1
Fork
You've already forked StarTenonAPI
0
8 Home
方琉璃 edited this page 2026年02月01日 14:59:42 +01:00

Occultus SDK Documentation

下一代、跨平台1 的 Minecraft 基岩版脚本开发工具包

这是什么?

Caution

这个工具包的一些 API 还处于早期开发阶段,并不适合投入生产环境

Occultus Script Development Kit(Occultus SDK, OSDK) 是一款模块化、轻量化的 Minecraft 基岩版脚本开发工具包。

它致力于降低脚本 API 的开发复杂度,并提供了一系列 API 来让开发者更轻松地添加某些复杂功能。

Occultus SDK 包括下面组件:

  • Occultus Core/隐匿核心
  • Star Tenon API/星隼框架
  • Moonlike Loom

使用

Node.js

我们需要使用 Node.js 以及其对应的包管理工具来获取 Occultus SDK。

我们推荐使用 pnpm,Occultus SDK 的包管理工具就是 pnpm。

如果你的计算机上没有安装,请访问 https://nodejs.org/ 下载并安装 Node.js。

初始化包管理工具

接着根据你使用的包管理工具选择适合的命令进行初始化:

npm init
pnpm init
yarn init

接着根据你使用的包管理工具选择适合的命令进行安装:

npm install @occultus/core
pnpm add @occultus/core
yarn add @occultus/core

这时,你就可以在项目中使用 Occultus SDK 了:

import { ModInitializer } from '@occultus/core';
const initializer = new ModInitializer("test", "Occultus SDK Test", "1.14.514")
initializer.onInitialize((arg) => {
 console.log("Occultus SDK Test Mod has been initialized!");
})

打包

打包脚本时,你需要一个支持将依赖递归打包进输出文件的脚本打包器,例如 Esbuild。

当然,更好的解决方案是直接使用 Moonlike Loom,这是 OSDK 内置的调试部署、项目编译与资源管理解决方案,与 OSDK 相关接口无缝衔接 :)

未来愿景

协议

本项目使用 MIT License 授权:

The MIT License (MIT)
Copyright © 2025 CTN Studios
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  1. 得益于基岩版本身就跨平台 ↩︎