Language

Lattice

Lattice

Modrinth

A Java 21 shared runtime and framework for structured Paper/Folia plugin development.

26 downloads 1 followers updated 7d ago
latest v0.8.7 Modrinth
Paper 1.21.11 – 1.21.11 LibraryUtility

Lattice

Lattice

A developer framework for structured, Folia-aware Paper plugins on Java 21.

Lattice standardizes lifecycle, modules, services, configuration, commands, text, tasks, UI, storage, diagnostics, and optional integrations so Minecraft plugins can stay small, explicit, and production-ready.


What Is Lattice?

Lattice is the shared foundation for BerylStudios and BerylLabs Minecraft plugins. It is not a gameplay plugin and it does not add commands, worlds, mechanics, or player-facing features by itself.

Plugin authors use Lattice to build Paper/Folia plugins with a consistent runtime shape: explicit modules, predictable lifecycle phases, typed services, validated configuration, Folia-aware task routing, storage helpers, and diagnostics that are useful when something breaks in production.


Deployment Model

Since 0.8.0, the preferred deployment model is the standalone shared runtime:

| Mode | Use When | Runtime Behavior |
| --- | --- | --- |
| Standalone shared runtime | New Paper/Folia plugins that can depend on Lattice being installed on the server | The server installs the Lattice plugin once. Dependent plugins compile against Lattice without relocation and join the Lattice classpath through an explicit Paper dependency. |
| Legacy isolated library mode | Self-contained plugin jars or compatibility paths that still need shading | Each dependent plugin owns its own Lattice runtime, module graph, service registry, task tracking, storage handles, and diagnostics surface. |

The standalone runtime is the recommended path for new work because it avoids repeating shared infrastructure across every dependent plugin on the same server.


What It Provides

| Area | Built-in Support |
| --- | --- |
| Lifecycle | Load, enable, ready, disable, startup reports, and failure rollback |
| Modules | Explicit feature modules with dependency ordering and cycle detection |
| Services | Typed service registry without reflection-heavy dependency injection |
| Config | Configurate YAML, defaults, validation, schema versions, migrations, and optional Junction variable rendering |
| Commands | Backend-neutral command trees with Paper registration |
| Text | Adventure components, MiniMessage, and legacy input boundaries |
| Tasks | Folia-aware async, global, region, and entity scheduling |
| UI | Inventory menus, books, anvil input, and virtual sign input |
| Storage | SQLite, MySQL, MariaDB, PostgreSQL, HikariCP, migrations, JDBC helpers, and shared pool management in standalone mode |
| Diagnostics | Runtime snapshots for lifecycle, modules, services, commands, tasks, UI, storage, and integrations |
| Integrations | PlaceholderAPI, PacketEvents, Junction, Nexo, Oraxen, ItemsAdder, and CraftEngine |


Modules

Lattice is split into three Maven artifacts:

| Artifact | Purpose |
| --- | --- |
| io.github.hydr46605:lattice-api | Minimal API status markers and the first shared-runtime contract boundary. |
| io.github.hydr46605:lattice-core | Platform-neutral contracts and base implementations under dev.beryl.lattice. |
| io.github.hydr46605:lattice-paper | Paper/Folia bootstrap, scheduler, command, UI, diagnostics, storage, hook, integration, and standalone host adapters. |

lattice-core intentionally contains no Bukkit, Paper, or Folia classes. Server-specific behavior belongs in lattice-paper, keeping core APIs testable and stable for plugin authors.


Compatibility

  • Java 21
  • Modern Paper 1.21.x, currently targeting 1.21.11
  • Folia-aware scheduling through explicit task contexts
  • Adventure components and MiniMessage as the primary text format
  • Pre-1.0 API status while the framework is hardened against real plugin integrations

Current Status

Lattice is in the 0.x beta line. Stable authoring paths exist, but breaking changes can still happen before 1.0.

The current focus is the shared-runtime architecture: one installed Lattice host, dependent plugins that register into that host cleanly, shared JDBC pool management, clearer diagnostics, and a smaller public API surface for long-term plugin authoring.

Versions

Beta
0.8.7
paper · 1.21.11 · 7d ago
# Lattice 0.8.7 - Folia Thread-Safety Hardening ## Fixed ### Critical (AsyncCatcher Errors) - **[CRITICAL]** Fixed `PaperTaskService.scheduleEntity()`…
1
Beta
0.8.6
paper · 1.21.11 · 9d ago
## Added - Added direct standalone host contract coverage for managed plugin registration, duplicate registration protection, handle detach, host diagnostics,…
1
Beta
0.8.5
paper · 1.21.11 · 9d ago
## Added - Added optional lifecycle failure context on `LifecycleException`, including runtime id, phase, failed operation, and module id when available. -…
1
Beta
0.8.4
paper · 1.21.11 · 9d ago
## Added - Added `ConfiguredUiException` for configured inventory authoring failures, including a stable `path()` accessor and contextual messages. - Added…
1
Beta
0.8.3
paper · 1.21.11 · 10d ago
## Added - Added `CommandExceptionMappers` as the reusable default command failure mapper for plugins that build command registration manually. - Added…
1
Beta
0.8.2
paper · 1.21.11 · 18d ago
## Added - Added typed PacketEvents listener registration with Lattice-owned unregister handles, listener priority, packet event wrappers, and a safe API…
4
Beta
0.8.1
paper · 1.21.11 · 23d ago
## Changed - Added Maven Central publishing for `lattice-api`, `lattice-core`, and `lattice-paper`. - Kept GitHub Packages as a permanent Maven mirror for the…
2
Beta
0.8.0
paper · 1.21.11 · 23d ago
## Added - Added the `lattice-api` artifact as the first small shared API boundary for the 1.0 runtime split. - Added a standalone Lattice host service that…
1
Beta
0.7.2
paper · 1.21.11 · 1mo ago
## Fixed - Made the Paper bootstrap resilient when Paper reaches `onEnable()` before a Lattice runtime was created in `onLoad()`. - Deferred Paper UI listener…
12
Beta
0.7.1
paper · 1.21.11 · 1mo ago
No changelog was specified.
2

Comments 0

No comments yet. Be the first to share your thoughts.