hakomc
v1.1.0
Published
Enhance ScriptAPI
Readme
hakomc
English
Overview
An ecosystem that supports library and plugin development using the ScriptAPI. The project consists of two main concepts:
- Runtime & development environment: hakomc-server
- Framework: hakomc
This repository is the core source of the framework side.
API Documentation
- Core (
hakomc): Timer / Net / Debug - Form (
hakomc/form/component) - DDUI (
hakomc/form/ddui/component) - Entity (
hakomc/entity) - Testing (
hakomc/testing) - Vite Plugin (
hakomc/vite-plugin): behaviorPacker
Development workflow
- Create a new working branch such as feature/*
- Update the library under core/
- Push once you reach a good checkpoint
- To verify your changes:
- In hakomc-server, rewrite the dependencies in package.json
"hakomc": "github:hakomc/hakomc#<branch-name>"- Running
npm install hakomcinstalls the latest state of that branch
Generated files
Some files are generated from the installed type / schema packages and committed. After upgrading the package, regenerate and commit them (a test fails while they are stale):
| Package | Command | Output |
| --- | --- | --- |
| @minecraft/server (and -ui / -net) | npm run gen:testing | core/testing/generated/ |
| @minecraft/bedrock-schemas | npm run gen:entity | core/entity/generated/components.ts |
日本語
概要
ScriptAPIを使用したライブラリやプラグイン作成をサポートするエコシステムです。 プロジェクトとしては大きく二つの概念があります。
- 動作環境&開発環境: hakomc-server
- フレームワーク: hakomc
このリポジトリはフレームワーク側のコアソースになっています。
APIドキュメント
- Core (
hakomc): Timer / Net / Debug - Form (
hakomc/form/component) - DDUI (
hakomc/form/ddui/component) - Entity (
hakomc/entity) - Testing (
hakomc/testing) - Vite Plugin (
hakomc/vite-plugin): behaviorPacker
開発手順
- feature/* 等で新しく作業ブランチを切る
- core/ 配下でライブラリを更新
- キリが良いところで push する
- 動作確認は以下
- hakomc-server側で package.json の dependencies を書き換え
"hakomc": "github:hakomc/hakomc#<ブランチ名>"npm install hakomcを実行するとブランチの最新の状態でインストールされる
生成するファイル
一部のファイルは、インストール済みの型定義・スキーマのパッケージから生成して commit しています。パッケージを上げたら、生成し直して commit してください(古いままだとテストが失敗します)。
| パッケージ | コマンド | 生成先 |
| --- | --- | --- |
| @minecraft/server(と -ui / -net) | npm run gen:testing | core/testing/generated/ |
| @minecraft/bedrock-schemas | npm run gen:entity | core/entity/generated/components.ts |
