Maze Wand: Wilson Maze Generator
Generate customizable, fully connected mazes with a magical wand and a simple Japanese chat menu. Powered by Wilson’s Algorithm and verified with BFS.
⬇ Download on ModrinthMaze Wand: Wilson Maze Generator
Build mazes with a wand. Get lost, but never trapped.
Overview
Maze Wand is a vanilla data pack for Minecraft Java Edition that generates customizable mazes directly inside your world.
When the data pack detects a player for the first time, it automatically gives them a glowing Magic Wand. Right-clicking the wand opens a clickable Japanese chat menu for generating mazes, changing their dimensions, selecting materials, and managing the latest maze.
The entrance is created at the player’s position, and the maze extends toward the +X and +Z directions.
No mod or resource pack is required.
Features
- Generate mazes through a clickable Magic Wand menu
- Configure the number of maze cells along the X and Z axes
- Change the path width, wall thickness, and wall height
- Use the block beneath the player as the maze material
- Set any valid block ID manually
- Automatically generate a solid floor using the wall material
- Display progress messages during generation
- Stop an active generation process
- Delete or regenerate the latest maze
- Use traditional
/functioncommands - Generate mazes without an artificial size limit
How Maze Generation Works
Maze Wand uses Wilson’s Algorithm, a maze-generation method based on loop-erased random walks.
- The complete maze area is initially filled with the selected material.
- An unvisited cell begins a random walk.
- When the walk loops back into itself, the loop is erased.
- When the walk reaches the existing maze, the remaining path is carved.
- The process continues until every maze cell has been connected.
Because directions are selected randomly, the resulting maze has less directional bias and fewer repetitive road-grid patterns.
After carving is complete, the data pack performs a BFS reachability check. The maze is only marked as complete when the entrance and exit exist and the goal can be reached from the start.
How to Use
- Place
MazeGenerator_26_1_2.zipin the world’sdatapacksfolder without extracting it. - Re-enter the world or run
/reload. - Right-click the automatically provided Magic Wand.
- Open the settings menu and configure the maze.
- Stand where the entrance should be created.
- Select Generate Maze.
If the wand is lost, use:
/function maze:give_wand
Available Settings
| Setting | Description |
|---|---|
| X-axis path count | Number of maze cells along the X axis |
| Z-axis path count | Number of maze cells along the Z axis |
| Path width | Width of each walkable passage |
| Wall thickness | Thickness of the walls between passages |
| Wall height | Vertical height of the maze walls |
All values have a minimum of 1.
Maze Materials
There are two ways to select the wall and floor material:
- Automatic selection: Stand on the desired block and select the floor-material option from the Magic Wand menu.
- Block ID selection: Enter a valid block ID with
maze:set_material.
Example:
/function maze:set_material {block:"minecraft:diamond_block"}
The selected material is used for both the walls and the automatically generated floor.
Advanced Commands
/function maze:help
/function maze:give_wand
/function maze:set_material {block:"minecraft:diamond_block"}
/function maze:generate {w:21,d:21,h:4,wall:1,path:2,block:"minecraft:stone_bricks"}
/function maze:cancel
In the direct generation command:
w: Number of maze cells along the X axisd: Number of maze cells along the Z axish: Wall heightwall: Wall thicknesspath: Path widthblock: Wall and floor material
Special Sizes
1x1: The start and goal use the same cell.1xNandNx1: A straight passage is generated with the entrance and exit at opposite ends.- Small two-cell-wide mazes use the same reachability verification as regular mazes.
Compatibility
Tested successfully on:
- Minecraft Java Edition 26.1.2
- Minecraft Java Edition 26.2
Important Notes
World modification warning: Maze generation overwrites blocks and clears passages inside the generated area. Back up important worlds before generating a maze.
Deletion warning: “Delete Latest Maze” clears the generated area. It is not a complete undo system and does not restore the original terrain.
Performance warning: Extremely large mazes may cause severe lag, freeze the world, or crash Minecraft. Huge maze generation is performed entirely at your own risk.
Only one maze can be generated at a time.
To prevent internal /trigger messages from appearing in chat, the data pack disables the world’s command-feedback gamerule while loaded.
- Downloads as MazeGenerator_26_1_2.zip
- Download size: 49 KB
- Download link checked 10 Aug 2026 — working
These come from our own check of the pack file, not from the source page.