🧹 unload#
Generates unload functions clearing the entities, blocks, items, objectives and storages the datapack creates.
- beet_default(ctx: Context) None[source]#
Main entry point for the unload plugin. This plugin sets up basic unload functions to clear entities, blocks, items, scoreboard objectives, and storages that are detected in the datapack functions.
It also scans library ZIPs for custom unload functions and adds calls to them in the main unload function.
- Parameters:
ctx – The beet context.
- uuid2inline(uuid: str) str[source]#
Convert a Minecraft NBT UUID list to inline UUID string format.
Input: ‘[I; -1234, 5678, -91011, 12131415]’ (four signed 32-bit ints), or ‘uuid(“<hyphenated uuid>”)’ returned as is Output: ‘fffffb2e-0000162e-fffed97d-00b8e8f7’ (eight hex chars per int, joined with dashes)
- class UnloadEntry(header: str, commands: set[str] = <factory>, callback: ~collections.abc.Callable[[set[str]], None] | None = None)[source]#
Bases:
objectOne category of commands to generate during unload.
- class UnloadFunction(
- ctx: Context,
- ns: str,
- version: str,
Bases:
objectClass to generate the unload functions for the datapack
- unload_library(
- lib: DownloadedLib,
Scan a library ZIP for unload functions and add them to the libraries entry.
Precision order: 1. v{version}/{filename}.mcfunction 2. {filename}.mcfunction 3. #{filename}.json
Valid filenames: unload, uninstall (and variants with -/_ and with-libraries/with-libs/libraries/libs suffix)