Kore user guide (for assistive teaching)
Kore is a Kotlin library for Minecraft Java Edition 1.20+ datapacks: type-safe builders for functions, JSON data, commands, selectors, and worldgen. Bedrock and older MC versions are out of scope unless the user explicitly targets a fork.
The agent should not assume the user has the Kore monorepo checked out. Prefer official docs and Maven artifacts. Use the documentation index for page-by-page lookup.
Activation boundaries
Use this skill when the user asks about:
- Kore project setup or dependency configuration.
- Building datapacks in Kotlin with Kore DSL.
- Choosing between
kore, oop, helpers, and bindings.
- Finding official Kore docs for a concrete feature.
Do not use this skill as the primary guidance for:
- Bedrock edition tooling.
- Vanilla datapack-only workflows with no Kotlin/Kore intent.
- General Kotlin language teaching unrelated to Kore.
Default response procedure
Follow this order unless the user already provided a narrower request:
- Confirm target: user wants Kore for Java datapacks.
- Provide minimal setup (dependency + compiler flag + JDK/Gradle baseline).
- Give a small, runnable DSL skeleton (
dataPack, function, generate*).
- Route to exactly one or two official docs pages for next depth.
- Add optional module guidance (
oop/helpers) only if needed.
Prerequisites checklist
- JDK 21+ and Gradle (Kore template uses the wrapper).
- Dependency:
implementation("io.github.ayfri.kore:kore:<VERSION>") (start with the kore module only).
- Kotlin compiler option: add
-Xcontext-parameters (required by Kore).
- Optional: Kore Template for a ready project.
Snapshots: Sonatype snapshot repo plus VERSION-SNAPSHOT when the user needs unreleased features (see Getting Started).
Gotchas
-Xcontext-parameters is required. Missing it often produces confusing compile errors.
function("...") path is logical datapack path, not a filesystem path with .mcfunction extension.
- Start with
kore only. Adding oop and helpers too early increases API noise and weakens guidance quality.
- If behavior seems undocumented, check Known Issues before proposing workarounds.
- Prefer stable docs and artifacts by default; use snapshots only when the user explicitly needs unreleased features.
Installable modules (pick by need)
| Module |
Coordinates io.github.ayfri.kore: |
Role |
kore |
kore |
Core DSL: datapacks, functions, data-driven JSON, commands. Always the first dependency. |
oop |
oop |
Higher-level gameplay: entities, teams, scoreboards, timers, boss bars, spawners, game state, events. |
helpers |
helpers |
Cross-cutting utilities: raycasts, renderers, scoreboard math, state delegates, scheduler patterns, VFX. |
bindings |
bindings |
Experimental: import existing datapacks and generate Kotlin bindings. |
Add oop / helpers only when the user’s feature set justifies the extra API surface.
Mental model (minimum viable understanding)
- Entry:
dataPack("namespace_id") { ... } builds a DataPack.
- Functions:
function("path/without_mcf_extension") { ... } emit .mcfunction files; commands and helpers live in these blocks.
- Output:
DataPack exposes generate(), generateZip(), generateJar() (see Creating a Datapack for paths and options).
- Style: heavy use of lambdas and extension functions on
DataPack to split large packs into register functions (documented in Getting Started).
Suggested order for help or self-study
- Getting Started (project, first pack,
pack {}, load patterns).
- Creating a Datapack (lifecycle,
generate* APIs, structure).
- Configuration (JSON formatting, dev-friendly output).
- Commands and Functions (command DSL, function layout, tags).
- Cookbook (end-to-end recipes).
- Concepts as needed: Selectors, Chat Components, Scoreboards, Components.
- Data-driven: Tags, Predicates, Loot Tables, Recipes, Advancements, Worldgen, etc.
- Macros when reusing command fragments.
- Optional modules: OOP Utilities, Helpers Utilities, Bindings.
- Known Issues before debugging odd behavior.
Migration from hand-written datapacks: From Datapacks to Kore.
LLM-friendly and machine-readable docs
Point users or tools at these when they want crawlable, consolidated reference outside the website navigation.
Progressive disclosure rules
- Read
./references/REFERENCE.md when the user asks for a specific feature area, page path, or topic map.
- Prefer linking only the most relevant docs page first; avoid dumping many links unless explicitly asked.
- Use
llms.txt or llms-full.txt only when broad, machine-readable indexing is requested.
Quality loop before final answer
Before finalizing guidance:
- Verify the answer stays inside Java Edition + Kore scope.
- Verify setup includes dependency and
-Xcontext-parameters when setup is discussed.
- Verify all links point to official Kore docs or clearly-labeled template/repo resources.
- Trim generic Kotlin/Minecraft advice that is not Kore-specific.
Working inside the Kore repository (contributors)
If the task is Kore development rather than using Kore: contributor docs live under website/src/jsMain/resources/markdown/doc/ in the repo. The public site mirrors that content at https://kore.ayfri.com/docs/.... For internals (generators, architecture), use Contributing and Architecture and Patterns.
Full documentation map
For a complete topic list with links, read reference.md.
1---2name: kore-user-guide3description: Teaches and guides use of Kore, the Kotlin library for generating Minecraft Java Edition datapacks. Covers Gradle setup, modules (kore, oop, helpers, bindings), DSL patterns, generation APIs, and where to read official documentation. Use when the user works with Kore, io.github.ayfri.kore, Minecraft datapacks in Kotlin, or asks how to build or structure Kore projects without browsing the full Kore repository.4license: GPL-3.0-only5---67# Kore user guide (for assistive teaching)89Kore is a **Kotlin** library for **Minecraft Java Edition 1.20+** datapacks: type-safe builders for functions, JSON data, commands, selectors, and worldgen. Bedrock and older MC versions are out of scope unless the user explicitly targets a fork.1011The agent should **not** assume the user has the Kore monorepo checked out. Prefer **official docs** and **Maven artifacts**. Use the [documentation index](./references/REFERENCE.md) for page-by-page lookup.1213## Activation boundaries1415Use this skill when the user asks about:16- Kore project setup or dependency configuration.17- Building datapacks in Kotlin with Kore DSL.18- Choosing between `kore`, `oop`, `helpers`, and `bindings`.19- Finding official Kore docs for a concrete feature.2021Do not use this skill as the primary guidance for:22- Bedrock edition tooling.23- Vanilla datapack-only workflows with no Kotlin/Kore intent.24- General Kotlin language teaching unrelated to Kore.2526## Default response procedure2728Follow this order unless the user already provided a narrower request:291. Confirm target: user wants **Kore for Java datapacks**.302. Provide minimal setup (dependency + compiler flag + JDK/Gradle baseline).313. Give a small, runnable DSL skeleton (`dataPack`, `function`, `generate*`).324. Route to exactly one or two official docs pages for next depth.335. Add optional module guidance (`oop`/`helpers`) only if needed.3435## Prerequisites checklist36371. **JDK 21+** and **Gradle** (Kore template uses the wrapper).382. Dependency: `implementation("io.github.ayfri.kore:kore:<VERSION>")` (start with the `kore` module only).393. Kotlin **compiler option**: add `-Xcontext-parameters` (required by Kore).404. Optional: [Kore Template](https://github.com/Kore-Minecraft/Kore-Template) for a ready project.4142**Snapshots:** Sonatype snapshot repo plus `VERSION-SNAPSHOT` when the user needs unreleased features (see [Getting Started](https://kore.ayfri.com/docs/getting-started)).4344## Gotchas4546- `-Xcontext-parameters` is required. Missing it often produces confusing compile errors.47- `function("...")` path is logical datapack path, not a filesystem path with `.mcfunction` extension.48- Start with `kore` only. Adding `oop` and `helpers` too early increases API noise and weakens guidance quality.49- If behavior seems undocumented, check [Known Issues](https://kore.ayfri.com/docs/advanced/known-issues) before proposing workarounds.50- Prefer stable docs and artifacts by default; use snapshots only when the user explicitly needs unreleased features.5152## Installable modules (pick by need)5354| Module | Coordinates `io.github.ayfri.kore:` | Role |55|------------|--------------------------------------|------|56| `kore` | `kore` | Core DSL: datapacks, functions, data-driven JSON, commands. **Always the first dependency.** |57| `oop` | `oop` | Higher-level gameplay: entities, teams, scoreboards, timers, boss bars, spawners, game state, events. |58| `helpers` | `helpers` | Cross-cutting utilities: raycasts, renderers, scoreboard math, state delegates, scheduler patterns, VFX. |59| `bindings` | `bindings` | Experimental: import existing datapacks and generate Kotlin bindings. |6061Add `oop` / `helpers` only when the user’s feature set justifies the extra API surface.6263## Mental model (minimum viable understanding)6465- **Entry:** `dataPack("namespace_id") { ... }` builds a `DataPack`.66- **Functions:** `function("path/without_mcf_extension") { ... }` emit `.mcfunction` files; commands and helpers live in these blocks.67- **Output:** `DataPack` exposes `generate()`, `generateZip()`, `generateJar()` (see [Creating a Datapack](https://kore.ayfri.com/docs/guides/creating-a-datapack) for paths and options).68- **Style:** heavy use of **lambdas** and **extension functions** on `DataPack` to split large packs into register functions (documented in Getting Started).6970## Suggested order for help or self-study71721. [Getting Started](https://kore.ayfri.com/docs/getting-started) (project, first pack, `pack {}`, `load` patterns).732. [Creating a Datapack](https://kore.ayfri.com/docs/guides/creating-a-datapack) (lifecycle, `generate*` APIs, structure).743. [Configuration](https://kore.ayfri.com/docs/guides/configuration) (JSON formatting, dev-friendly output).754. [Commands](https://kore.ayfri.com/docs/commands/commands) and [Functions](https://kore.ayfri.com/docs/commands/functions) (command DSL, function layout, tags).765. [Cookbook](https://kore.ayfri.com/docs/guides/cookbook) (end-to-end recipes).776. Concepts as needed: [Selectors](https://kore.ayfri.com/docs/concepts/selectors), [Chat Components](https://kore.ayfri.com/docs/concepts/chat-components), [Scoreboards](https://kore.ayfri.com/docs/concepts/scoreboards), [Components](https://kore.ayfri.com/docs/concepts/components).787. Data-driven: [Tags](https://kore.ayfri.com/docs/data-driven/tags), [Predicates](https://kore.ayfri.com/docs/data-driven/predicates), [Loot Tables](https://kore.ayfri.com/docs/data-driven/loot-tables), [Recipes](https://kore.ayfri.com/docs/data-driven/recipes), [Advancements](https://kore.ayfri.com/docs/data-driven/advancements), [Worldgen](https://kore.ayfri.com/docs/data-driven/worldgen), etc.798. [Macros](https://kore.ayfri.com/docs/commands/macros) when reusing command fragments.809. Optional modules: [OOP Utilities](https://kore.ayfri.com/docs/oop/oop-utilities), [Helpers Utilities](https://kore.ayfri.com/docs/helpers/utilities), [Bindings](https://kore.ayfri.com/docs/advanced/bindings).8110. [Known Issues](https://kore.ayfri.com/docs/advanced/known-issues) before debugging odd behavior.8283**Migration from hand-written datapacks:** [From Datapacks to Kore](https://kore.ayfri.com/docs/guides/from-datapacks-to-kore).8485## LLM-friendly and machine-readable docs8687- [llms.txt](https://kore.ayfri.com/llms.txt) (short index)88- [llms-full.txt](https://kore.ayfri.com/llms-full.txt) (expanded)8990Point users or tools at these when they want crawlable, consolidated reference outside the website navigation.9192## Progressive disclosure rules9394- Read `./references/REFERENCE.md` when the user asks for a specific feature area, page path, or topic map.95- Prefer linking only the most relevant docs page first; avoid dumping many links unless explicitly asked.96- Use `llms.txt` or `llms-full.txt` only when broad, machine-readable indexing is requested.9798## Quality loop before final answer99100Before finalizing guidance:1011. Verify the answer stays inside Java Edition + Kore scope.1022. Verify setup includes dependency and `-Xcontext-parameters` when setup is discussed.1033. Verify all links point to official Kore docs or clearly-labeled template/repo resources.1044. Trim generic Kotlin/Minecraft advice that is not Kore-specific.105106## Working inside the Kore repository (contributors)107108If the task is **Kore development** rather than **using** Kore: contributor docs live under `website/src/jsMain/resources/markdown/doc/` in the repo. The public site mirrors that content at `https://kore.ayfri.com/docs/...`. For internals (generators, architecture), use [Contributing](https://kore.ayfri.com/docs/contributing/contributing) and [Architecture and Patterns](https://kore.ayfri.com/docs/contributing/architecture-and-patterns).109110## Full documentation map111112For a complete topic list with links, read [reference.md](./references/REFERENCE.md).