bridge. Documentation

website·Indexed 31 days ago

https://bridge-core.app

Documentation for bridge. v2, a development environment for Minecraft Bedrock Add-Ons. Includes guides on project types, Molang files, and the Dash compiler, as well as comprehensive API references for extension developers using modules such as @bridge/ui, @bridge/project, @bridge/monaco, and @bridge/utils.

Tokens
36.7K
Snippets
199
Records
333
Agent score
63%

What's inside bridge.

  1. Overview of the Dash compiler

    Dash is the default compiler for bridge. projects. It transforms source files into destination files, powering custom syntax such as custom components, custom commands, and molang files. It is also responsible for moving compiled projects to the com.mojang folder.
  2. Overview of bridge. Dash commands

    Dash commands allow users to generate Minecraft commands programmatically using JavaScript or TypeScript. They integrate into bridge. by appearing in auto-completions within .mcfunction or JSON files.

    Critical Constraint: Dash commands cannot be used directly within the Minecraft game client; they are only usable within project files inside the bridge. editor to generate standard Minecraft commands.

  3. Overview of built-in Dash plugins

    Dash includes several built-in plugins for add-on development:

    • formatVersionCorrection: Ensures format versions work within JSON files that Minecraft would otherwise reject.
    • simpleRewrite: Handles file rewriting for development and production builds.
    • rewriteForPackaging: Prepares files for packaging into .mcaddon, .mctemplate, or .mcworld formats.
    • molang: Manages Molang file locations and minification.
    • customCommands: Manages custom command locations in JSON.
    • generatorScripts: Enables the use of generator scripts.
  4. Overview of Dash Commands in bridge.

    Dash commands allow developers to generate Minecraft commands programmatically using JavaScript or TypeScript. They integrate into bridge.'s auto-completions within .mcfunction or JSON files.

    Critical Constraint: Dash commands cannot be executed directly within the Minecraft game client; they are only usable within project files during development to generate standard Minecraft commands.

  5. Overview of Dash Components

    Dash components allow developers to extract common logic from entity, block, and item files to generate JSON using JavaScript or TypeScript. They integrate into the bridge. editor and appear in auto-completions alongside built-in Minecraft components.
  6. Overview of Dash Components in bridge.

    Dash components allow developers to extract common logic from entity, block, and item files and generate JSON using JavaScript or TypeScript. They integrate into bridge. by appearing in auto-completions alongside Minecraft's built-in components.
  7. Overview of bridge. extension capabilities

    bridge. extensions allow for deep customization of the application. Key capabilities include:

    • Themes: Modify the visual appearance and look of bridge.
    • Snippets: Quickly insert predefined code blocks into files.
    • Presets: Create files via a simple form UI.
    • UI Elements: Add custom sidebars, tabs, and windows.
    • Compiler Plugins: Extend the bridge. compiler to support custom syntax and advanced processing.
  8. Overview of the Dash Compiler

    Dash is the default compiler for bridge. projects. It is responsible for transforming source files into destination files, powering custom syntax such as custom components, custom commands, and molang files. It also handles moving compiled projects to the com.mojang folder.
  9. Overview of @bridge/persistent-storage

    The @bridge/persistent-storage module provides methods to handle persistent data storage using IndexedDB (idb). Note that data stored via this module can be lost if the user clears their site data in browser settings.
    import { save, load, delete } from "@bridge/persistent-storage";
  10. Manage files with the flexible tab system

    The tab system supports split-screen mode (useful for viewing code and file previews side-by-side) and various tab types, including 3D model renders and custom tree editors. Tabs are temporary by default; they become persistent upon editing or double-clicking.
  11. Use auto-completions and validation in the editor

    bridge. provides dynamic auto-completions and validation in both the text and tree editors. Key features include:

    • Validation against schemas to highlight syntax errors.
    • Background scanning of packs to cache identifiers, tags, and events for suggestions.
    • Context-aware suggestions filtered by the file's format_version and project config experimental toggles.
    • Intelligent file-type guessing for files opened from outside the editor.
  12. Sync bridge. projects to Minecraft com.mojang folders

    bridge. can compile projects directly into the development_behavior_packs and development_resource_packs folders within the com.mojang directory. This allows changes made in bridge. to appear automatically in Minecraft. This feature requires Minecraft Bedrock to be installed on a computer; it is not available on mobile devices.