stewbeet.plugins.datapack.loading
The datapack.loading plugin sets up the versioned loading system for Minecraft datapacks.
It creates version checking functions, load management, and item storage systems following the LanternLoad convention.
The plugin ensures proper datapack initialization with dependency validation and prevents duplicate loading.
(This plugin requires stewbeet.plugins.finalyze.dependencies later in the pipeline to complete the setup.)
Some Features Showcase
Lantern Load Setup (#load, #enumerate, #resolve, etc.):
All item definitions stored into a storage:
Confirm datapack load for players with convention.debug tag:
Source Code: stewbeet/plugins/datapack/loading/__init__.py
What it does
- Sets up versioned datapack loading system
- Implements version checking and validation
- Creates item storage systems for definitions
- Prevents duplicate datapack loading
- Follows LanternLoad convention standards
- Manages load status tracking with scoreboards
- Announces the pack to others with the Smithed "pack enabled tag" convention (
#ns:installed,#ns:major,#ns:minor,#ns:patch), for packs supporting Minecraft 26.3 and newer
Dependencies
- β Required: None (but works best with other StewBeet plugins)
- π Requires Later:
stewbeet.plugins.finalyze.dependencies(to complete setup) - π Position: Should be placed after item definitions and before finalization plugins
(seebasic/beet.ymlfor an example)
Configuration
Basic Example Configuration
yaml
version: "1.0.0" # Required: semantic version (major.minor.patch)
id: "your_namespace" # Required: project namespace
name: "Your Project Name" # Required: display name for load messages
pipeline:
- ...
- stewbeet.plugins.datapack.loading # Place this plugin in the pipeline
- ... # Other plugins follow
- stewbeet.plugins.finalyze.dependencies # Required later for completionConfiguration Options
| Option | Type | Default | Description |
|---|---|---|---|
version | string | Required | Semantic version in format "major.minor.patch" for version checking |
id | string | Required | Project namespace used for function and storage generation |
name | string | Required | Display name used in load confirmation messages |
meta.stewbeet.items_storage | bool | true | Write every item definition into <id>:items all on load. datapack.custom_blocks and compatibilities.simpledrawer read it; a project using neither can set false to skip the function and the storage it fills |
Features
Versioned Loading System
- π’ Version Parsing - Splits semantic version into major.minor.patch components
- π Version Checking - Creates enumerate function for version validation
- π― Load Resolution - Generates resolve function for proper version loading
- π·οΈ Function Tags - Sets up enumerate and resolve function tags
Load Management
- π« Duplicate Prevention - Prevents multiple executions of load functions
- π Status Tracking - Uses scoreboards to track loading state
- π¬ Load Confirmation - Displays load messages to players with
convention.debugtag - βοΈ Secondary Function - Manages actual load execution flow
Item Storage System
- ποΈ Storage Initialization - Creates namespace:items storage system
- π§ Component Processing - Handles item components and minecraft: namespace prefixing
- π― Data Filtering - Excludes non-component data from storage
- π JSON Serialization - Converts definitions to storage commands
Next steps
- Defining items and blocks: where the items this plugin reads are declared.
- All plugins: the rest of the pipeline, in the order it runs.
- Configuring the build: enabling, ordering and configuring plugins.