Cobblemon Moving Platform NPCs
An autonomous Cobblemon NPC that moves along a configured path through the world on its own schedule. Players stand on it, ride along, and step off whenever they want. It builds on the same solid-block-lift-and-place trick the Puzzle Rock uses, but is driven by a tick loop instead of player interaction. The intended use is to transport the player across gaps or to be activated/deactivated as part of a puzzle.
What it does
The NPC comes in two sizes: a 1x1x1 single block and a 2x1x2 wide platform. Both follow the same logic:
- Waypoint path:
path_waypointsis a semicolon-separated string of absolute world coordinates. Example:"100,64,200;110,64,200;110,64,210". The platform steps toward the current waypoint atpath_tick_interval(default every 10 ticks), pauses forpath_pause_at_waypoint_tickson arrival, then advances. - Loop modes:
loop(wrap to start),pingpong(reverse direction at ends), oronce(stop at last waypoint). - Per-step shape: multi-axis paths interpolate diagonally instead of stepping one axis at a time. A path from
(0,0,0)to(5,5,5)takes 5 steps rather than 15. - Activation radius:
path_player_radius(default 32) gates ticking on whether at least one player is nearby. - Pause condition:
path_paused_conditionis a Molang gate string. If it evaluatesv.result = true, the platform skips the tick. This is the hook for redstone-controlled stops, quest gating, or scoreboard-based pauses. - Blocked behaviour: when the next position is obstructed,
wait(stop until clear) orskip(advance to the next waypoint). - On-waypoint callbacks:
on_waypoint_commandandon_waypoint_script, both with a{{waypoint_index}}placeholder, fire each time the platform arrives. Useful for triggering doors or puzzle elements, playing a sound at a stop, or even activating another platform.
A reset interaction is built in. A perm-and-item-gated right-click sends the platform back to spawn and resets the waypoint index. Optional on_reset_command and on_reset_script hooks fire alongside.
Use cases
- Elevators: vertical 2-waypoint path,
pingpongmode, apause_at_waypoint_tickslong enough for a player to step off, withon_waypoint_commandopening the floor door. - Conveyor floors: long horizontal path with
is_wideon, a fast tick interval, and a loop. Players ride from one side of a room to the other. - Cutscene rails:
oncemode withon_waypoint_commandtriggers at each beat. The platform delivers the player to a vantage point and then fires the scripted event when it arrives. - Sokoban-style ferries:
is_solidtrue plus a redstone-gated pause condition lets a player operate the platform from a switch elsewhere in the puzzle.
How players actually ride it
This was the part that took the most iteration. The NPC itself is not solid, and instead relies on placing solid blocks at its next position to hold the player up. A player who knows this and is quick enough could just keep walking forward to be on the platform all the time, but one wrong move would cause them to appear to fall through the NPC. I tried two alternatives: teleporting the player with the NPC, or applying velocity to the player with Journey's q.player.push.
Teleporting worked, but felt very jarring. The player could not freely move about the top of the platform, as the platform continually reset their position and even their camera rotation. This made it quite difficult to look around or leave the platform in the direction you wished. I found pushing to be much more comfortable. You can look around and walk in any direction on the platform because the velocity from q.player.push is additive to your existing velocity. If you time it right, you can even jump forward and get a boost from the push!
As such, the platform pushes the player via q.player.push in the direction of platform travel each step instead of teleporting them. path_rider_push_strength is tunable so per-step drift roughly matches the platform's per-step distance. Care should be taken with this value, since pushing too hard causes the player to slide off and pushing too softly causes the platform to leave them behind.
Techy Stuff
- Built on Cobblemon's NPC, behaviour, and Molang systems, configured in JSON.
- Tick loop runs as an
add_tasks_to_activitytask onminecraft:idlepriority 0. The activation radius and tick interval are enforced inside the script rather than via Minecraft's brain priorities. - Solid-block management reuses the
cobblemon:get_block_on_npcandcobblemon:set_block_on_npchelpers from the puzzle rock, extended with anis_widebranch alongside the existing pillar branch. As such, all three footprints (cube, pillar, wide) share one code path. - Waypoint string parsing is cached in
q.entity.dataand only re-parsed when the config string changes. The tick loop does not re-tokenize every tick. - Models and textures built in Blockbench. Presets ship for the most common shapes so a server owner can drop one in without modeling.
Built for the Callisto and Cobblewilds Cobblemon servers, but available for commission.





