How It Works

The Conversion Process

  1. STL Parsing

    Your 3D model file is read entirely in the browser. Both binary and ASCII STL formats are supported. No data ever leaves your computer.

  2. Voxelization

    The mesh is converted into a 3D grid of blocks using ray-casting. For each column of the grid, rays are cast through the model to determine which cells are inside the mesh, creating a solid voxel representation.

  3. Fill Optimization

    Instead of generating one command per block, the tool uses a greedy line-merging algorithm. For each block, it tries extending in all 6 directions and picks the longest possible line. This produces fill commands that place many blocks at once, dramatically reducing the total command count.

  4. Command Output

    Commands use relative coordinates (~x ~y ~z) so they execute relative to your player position. Single blocks use setblock, lines use fill. Commands are sorted longest-first for efficiency.

Using the Commands in Minecraft

Datapack (Recommended)

The best way to add structures to Minecraft is using the downloadable datapack:

  1. Click "Download Datapack" to get a .zip file
  2. Place the .zip file in your world's datapacks folder (e.g., .minecraft/saves/YourWorld/datapacks/)
  3. In Minecraft, run /reload to load the datapack
  4. Stand where you want the model to appear and run /function commandfill:build

The datapack uses Minecraft's function system to execute all commands instantly. For very large models (65,000+ commands), it automatically splits into multiple function files.

Alternative: Keyboard Maestro (Mac)

If you prefer automation tools, you can use Keyboard Maestro to paste commands automatically:

  1. Load the commands .txt file into a variable
  2. Use a For-Each loop to iterate over each line
  3. For each line: open chat (T), paste the command, press Enter
  4. Add a short delay between commands to avoid throttling

Alternative: Minecraft Server

If you're running a Minecraft server, you can execute commands directly on the server console, which processes them one by one without the chat rate limits.

FAQ

What file formats are supported?

Currently only STL files (both binary and ASCII format). OBJ support with color mapping is planned for a future update.

Which Minecraft edition does this work with?

The commands are generated for Java Edition. They should also work in Bedrock Edition (same syntax), but this is untested.

Is there a size limit?

No hard limit, but larger models (scale > 100) will produce many commands and take longer to process. The tool will show a warning for very large conversions.

Are the models solid or hollow?

Models are solid-filled by default, matching the interior of the STL mesh. You can enable "Hollow" mode in the settings bar to create shell-only structures.

Is my file uploaded anywhere?

No. All processing happens entirely in your browser using JavaScript. Your file never leaves your computer.

Blog

Hello! Welcome. This is my first blog post on the site, and I figured a blog would create a space for some context if anyone's interested. So a little bit of a story time first. I've been doing some minecraft vanilla structures for about a year or so, and in that time really didn't consider adding 3d structures to minecraft. I made a lot of orbs, these were perfect circle hollow circles. I typically made them out of glass blocks. The delivery method I was using was Keyboard Maestro to input fill commands from a script.

Last week I came back to the orbs, made a few, then wanted to do more shapes. So I made a pyramid, some orbs, a video, and called it a day. Later on that day or the next I thought about 3d structures, and if they could be added to minecraft. So I looked into it, tested, and made a script to convert stl files to minecraft commands. Eventually I wondered if I needed to add these in manually or if I could add as datapack. The answer was a datapack, and the models began to flow. Soon I wanted to color them, and that's where this interface was born. I have a few ideas to add to the site, but for now it's just been a fun project that I can come back to and use for my minecraft worlds. Hopefully others find it useful too.

— Mark