A pair of NPCs meant for Sakoban-style puzzles similar to those found in the mainline Pokemon games. The Puzzle Rock is a 1-block cube; the Puzzle Pillar is its 2-block-tall sibling. Both share the same behaviour, the same dialogue, and the same configuration surface — they differ only in model, hitbox, and the extra block of headroom the pillar checks for when it moves. They can also be configured to move multiple blocks at once, to allow for ice block puzzles.
What it does
Right-clicking a puzzle NPC pushes it in the direction the player is facing on the world grid. Shift+right-click opens a menu instead:
- Rotate Clockwise / Counterclockwise — turn the NPC by a configurable number of degrees.
degrees_to_rotatesupports negative values, so a server owner can pick any snap step. - Ride — mount the NPC. Useful when the rock is solid and the puzzle wants the player to travel with it.
- Reset — return the NPC to its
home_x/y/zposition andreset_rotation_degreesrotation, and teleport the player back to a savedplayer_reset_x/y/zspot. - Close — dismiss the menu.
Push, rotate, ride, and reset are each independently toggleable, and each can be gated behind a permission node, a held item, or both. The same NPC can swap state on the fly based on the player's actions or the puzzle's progress.
What you can build with it
- Shrine puzzles — set a
goal_pos_x/y/z(and optionallygoal_rotation_degrees) and anon_goal_commandoron_goal_script. When the NPC comes to rest at the goal, the configured command or script fires — unlocking a door, granting an item, spawning a Pokémon, whatever the server owner wires up. - Movable terrain — turn
is_solidon and the NPC places apuzzle_rock_solid_block(defaultminecraft:barrier) under itself whenever it stops, so players can walk across a moving floor. Turnis_floatingon and it stops falling when there's nothing beneath it — useful for skybridge puzzles. - Sokoban-style rooms — combine pushability with a goal state and a visible solid block, and players solve box-pushing puzzles where the floor itself becomes the puzzle.
- Gym puzzles — the pillar variant reads as a stone column in a Pokémon gym; players push and rotate it into a goal position to progress the room.
What's different about the pillar
The pillar is the same NPC under the hood — same behaviour, same resolver — flagged with is_puzzle_pillar: true in its ai block. That flag changes one thing: the pushability check looks two blocks above the destination instead of one, so the pillar refuses to slide into a 1-block-tall gap. Visually, it swaps the cube.geo model and puzzle_rock.png texture for pillar.geo and puzzle_pillar.png, both resolved through the shared cobblemon:puzzle variation file.
A third aspect, invis, swaps the texture for a fully transparent one — useful when the puzzle relies on an invisible blocker or the NPC is configured to place visible solid blocks.
The goal-state mechanic
The goal-state config is what separates these NPCs from the cannon. The cannon launches; the puzzle rock resolves. Every push and every rotation re-checks the goal:
- If
goal_enabledisfalse, nothing fires. - If a goal coordinate is left at
0, that axis is wildcarded — the NPC can sit anywhere along it and still pass. - If
goal_rotation_degreesis left at0, rotation is wildcarded too. - When all enabled checks match, the NPC fires
on_goal_command(a vanilla/-command) and/oron_goal_script(a Molang script).
Care should be taken when setting goal coordinates, since 0 doubles as both "wildcard" and "the actual block at world origin". For shrines built far from spawn this is rarely an issue, but a puzzle placed near (0, 0, 0) should pick a deliberate non-zero goal — or be moved.
Techy Stuff
- Built on Cobblemon's NPC, behaviour, and dialogue systems (all configured in JSON).
- Interaction logic written in Molang, Bedrock's lightweight scripting language.
puzzle_rock_interaction.molangreads the NPC's permission, item, and toggle config, runscobblemon:move_when_pushedif the player passes, and otherwise emits a debug message and returns early. - Models and textures built in Blockbench:
cube.geofor the rock,pillar.geofor the pillar, both rendered through Cobblemon's poser system. - Solid mode swaps in a configurable
puzzle_rock_solid_blockas the NPC moves, so the player can stand on top without the rock falling out from under them.
Built for the Callisto and Cobblewilds Cobblemon servers, but available for commission.