Repository navigation
VS Code and LuaLS
Home / Getting started / VS Code and LuaLS
The BetaMoon API extension supplies definitions for BetaMoon on Minecraft Beta 1.7.3. LuaLS uses them for API completion, hover documentation, signatures and type checking.
- Open BetaMoon API on the Visual Studio Marketplace and select Install to open VS Code.
Alternatively, open VS Code's Extensions view and search for
@id:OWeinert.betamoon-api. - Confirm installation in VS Code. Lua by LuaLS is installed as a dependency.
- Open the folder containing your scripts and run BetaMoon: Enable API for Workspace Folder. Select the scripts folder if the workspace contains multiple folders.
With the VS Code command-line tool installed, you can also run:
code --install-extension OWeinert.betamoon-apiUse the global betamoon directly, as shown in Getting started.
Do not copy the editor definitions into .minecraft/betamoon/scripts or load them from a script.
Minecraft supplies the API at runtime; the extension only describes it to the editor.
The command adds the bundled definitions directory to the selected folder's LuaLS libraries and preserves existing entries.
It updates .luarc.json or .luarc.jsonc when present at the folder root, preserving comments and other settings.
Otherwise it updates Lua.workspace.library in the folder's VS Code settings. Save pending configuration edits first.
Open the folder containing the LuaLS configuration; externally configured Lua.misc.parameters config files are not managed.
Enabled workspaces refresh their library path after extension updates. Other workspaces and global user settings are untouched. The saved path is specific to the local or remote extension installation; each collaborator should enable their own copy. For SSH, WSL and containers, install the extension remotely. Browser-only VS Code is not supported.
Run BetaMoon: Disable API for Workspace Folder before uninstalling to remove the library entry. Disabling or uninstalling the extension by itself leaves the saved settings in place.
The matching addon source also works as a regular
LuaLS addon. Add the checkout's library directory to your project's
LuaLS workspace.library setting. Use one installation method per project to avoid duplicate definitions.
Use a definition version that matches your BetaMoon runtime and consult the API reference for supported fields and limitations. Editor type checks cannot verify runtime IDs, resources or world state.
- Installation
- Install scripts
- Getting started
- VS Code and LuaLS
- Examples
- Reload and compatibility
- Troubleshooting
- Changelog
Scripts and shared values
- Script lifecycle
- Packaged Lua mods
- Modules
- References and stacks
- Queries
- Overrides
- Minecraft constants
- Chat and positions
- Structured data
- Script configuration
- Particles
Blocks and items
- Multiblocks
- Blocks
- Block state and placement
- Block shapes and rendering
- Block callbacks
- Block ticks and redstone
- Items
- Fluids
- Item callbacks
- Tools and armor
- Materials
- Textures
Entities
- Entities
- Entity access and movement
- Entity lifecycle and data
- Entity health and loot
- Entity inventories and relationships
- Projectiles and pickups
- Entity presentation and sounds
- Living entities and AI
- Entity parts and sensors
Assets and audio
- Assets
- Models and animations
- Built-in Minecraft models
- Model appearances
- Blockbench workflow
- Audio
- Texture-pack overrides
Events and world actions
World generation
World systems
Inventories and screens
Recipes