MCPcopy Index your code
hub / github.com/Bedrock-OSS/regolith

github.com/Bedrock-OSS/regolith @1.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.8.0 ↗ · + Follow
435 symbols 1,488 edges 61 files 202 documented · 46%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Regolith

• Regolith is an Add-on Compiler for the Bedrock Edition of Minecraft.

Go to the Documentation ⇗

  • Much like bridge. v2, Regolith introduces the concept of a "project folder", where your addons are written, including the RP, the BP, and any models, textures or configuration files. This single-folder-structure is great for version control, and allows you to keep your "source-of-truth" outside of com.mojang.

  • In the simplest case, Regolith allows you to "compile" (copy) your RP and BP from the project folder, into the com.mojang folder. During the copy, Regolith will run a series of "filters" on the files, allowing you to programmatically transform them as they are copied into com.mojang. This allows you to transform your addon non-destructively, and to introduce new syntax into addons.

🎫 Value Preposition

  • Fundamentally, Regolith is nothing new. Many tools like this exist, such as the bridge v2 plugin system, or even something like Gulp or SASS.
  • The value preposition for Regolith is that it allows many tools, in many languages and pay-structures to work together in a single, unified compilation flow.
  • Hobbiests can use the Standard Library ⇗, or write their own filters. Marketplace teams can write proprietary filters, or internal filters.

💻 Regolith Development

🎚 Setup:

This setup is for developers. If you're a normal user, you can find simpler instructions here.

1. Install Golang

2. Install Dependencies

  • go get -u ./... to recursively install all dependencies.

3. Test / Run

Since Regolith is a console application which requires very specific project setup and arguments, go run .\main.go doesn't really do anything.

You can build and install Regolith from source using go install and test test the application in the same way as user would do, by using it on a separate Regolith project.

You can also write your own tests in the test directory. Here are some examples of useful test commands:

  • go test ./test - runs all of the tests from the test folder (we keep all of the test there)
  • go test ./test -v -run "TestRecycledCopy" - run only the "TestRecycledCopy" with verbose output.
  • dlv test ./test -- "-test.run" TestInstallAllAndRun - debug the "TestInstallAllAndRun" test using delve

You can also use VSCode plugin to run tests.

🏗 Building as a .exe:

  • You can build either with GoReleaser, or natively

1. Native

There are a few ways to build: - go install (installs to gopath) - go build (creates a .exe file)

2. GoReleaser

  • go install github.com/goreleaser/goreleaser@latest
  • ./scripts/build-local.sh - use this script to build the project with GoReleaser.

Extension points exported contracts — how you extend this code

FilterInstaller (Interface)
(no doc) [10 implementers]
regolith/filter.go
FilterRunner (Interface)
(no doc) [1 implementers]
regolith/filter.go

Core symbols most depended-on inside this repo

MkdirAll
called by 36
regolith/file_system.go
Run
called by 28
regolith/main_functions.go
getWdOrFatal
called by 27
test/common.go
prepareTestDirectory
called by 25
test/common.go
copyFilesOrFatal
called by 24
test/common.go
RunSubProcess
called by 21
regolith/utils.go
comparePaths
called by 20
test/common.go
absOrFatal
called by 20
test/common.go

Shape

Function 243
Method 138
Struct 48
TypeAlias 4
Interface 2

Languages

Go99%
Python1%

Modules by API surface

regolith/file_system.go35 symbols
regolith/filter.go33 symbols
regolith/utils.go30 symbols
regolith/filter_remote.go26 symbols
regolith/profile.go18 symbols
regolith/main_functions.go18 symbols
test/export_targets_test.go17 symbols
regolith/export.go17 symbols
regolith/filter_python.go13 symbols
regolith/config.go13 symbols
regolith/user_config.go12 symbols
regolith/filter_shell.go11 symbols

For agents

$ claude mcp add regolith \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact