Repository navigation
Getting Started
Home / Getting started
Install BetaMoon, then save the following as hello.lua directly inside the instance's .minecraft/betamoon/scripts folder.
name = "Hello BetaMoon"
version = "1.0.0"
description = "A first registered item and crafting recipe."
function modInit()
local token = betamoon.items:add {
id = 6000,
key = "mymod:item/hello_token",
displayName = "Hello Token",
icon = { x = 10, y = 1 },
maxStackSize = 16
}
betamoon.recipes:add {
type = "shapeless",
output = betamoon.stack(token, 1),
ingredients = { betamoon.stack(280), betamoon.stack(331) }
}
endChoose another item ID if 6000 is already occupied. Use your own namespace in place of mymod for a lasting mod.
Open BetaMoon's Scripts screen to inspect loading status and errors. In a world, craft one stick with one redstone
dust to obtain the token.
name identifies this script for dependencies. modInit() registers the item and its recipe. items:add returns the item reference used by betamoon.stack to describe the recipe output.
- VS Code and LuaLS adds API completion and hover documentation to your editor.
- Items describes every item declaration field.
- Blocks introduces block declarations.
- Callbacks adds behavior to item interactions.
- Examples links to working scripts for each API area.
Use the Scripts screen or Ctrl+Shift+R to hot reload. Reload on save is optional and can be enabled in the BetaMoon config. Keep registered IDs stable when iterating on content used in saved worlds.
- 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