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

Method 1: Chat (Small Models)

For models with fewer commands, paste them one at a time into the Minecraft chat window. You'll need to be in Creative mode or have operator permissions.

Method 2: Command Blocks

Place command blocks in a chain and paste one command into each. Activate with a button or redstone signal.

Method 3: Datapack (Recommended for Large Models)

The easiest way to run many commands 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.

Method 4: Keyboard Maestro (Mac)

Automate pasting hundreds of commands using a Keyboard Maestro macro:

  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

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, matching the interior of the STL mesh. Hollow mode is planned for a future update.

Is my file uploaded anywhere?

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