Skip to content

What is a Bundle?

A bundle packages content in FoundryEngine. It combines scripts, textures, models, and data files in a single folder. No Java compilation or build tools needed.

Folder structure

A bundle looks like this:

my-bundle/
├── my-bundle.bundles.toml      # The "ID card" of your bundle
├── scripts/
│   ├── common/                 # Shared logic (items, blocks, recipes)
│   ├── client/                 # Client-only code (rendering, keybinds)
│   └── server/                 # Server-only code (commands, data)
├── assets/                     # Resource pack (textures, models, sounds)
│   └── my_namespace/
│       ├── textures/
│       ├── models/
│       └── sounds/
└── data/                       # Data pack (recipes, loot tables, tags)
    └── my_namespace/
        ├── recipes/
        └── loot_tables/

What can a bundle contain?

ContentHow to create it
ItemsUse ItemBuilder in a script
BlocksUse BlockBuilder in a script
Recipes (all 9 types)Use RecipeBuilder in a script
SoundsUse SoundBuilder in a script
ParticlesUse ParticleBuilder in a script
EventsSubscribe to events in a script
CommandsRegister commands in a script
DimensionsUse the instanced worlds system
CutscenesUse the cutscene system
Textures/modelsPlace in assets/ folder
Data pack filesPlace in data/ folder

Bundle lifecycle

  1. Discovery — FoundryEngine reads bundles from FoundryEngine/bundles/ when the game starts
  2. Loading — Each bundle's entrypoint script runs onLoad()
  3. RegistrationBundleEvents.registry registers items, blocks, recipes, sounds, particles
  4. Runtime — Events fire, scripts run, your content works
  5. Unload/engine reload triggers onUnload() then re-discovers everything

Distribution

Bundles are distributed as folders (no ZIP needed). Users place them in FoundryEngine/bundles/ and run /engine reload.

Next

FoundryEngine is a work-in-progress. Documentation may change.