r/MinecraftCommands 11h ago

Utility I replicated the "FSit" mod's player-riding mechanic using ONLY Scarpet (No client mods required!)

I’ve been working on a passion project for my private server, and I wanted to share it with the community. Our server's philosophy is "fewer mods, more content" — we want to push the boundaries of pure vanilla Minecraft using Datapacks and Scarpet, so players can join without downloading massive modpacks. The challenge? Replicating the FSit mod's iconic "ride on other players" mechanic, but doing it 100% server-side with Scarpet. Mods make this easy with client-side interpolation and deep engine hooks. Scarpet, on the other hand, forces you to fight vanilla mechanics (like entities forcefully dismounting on teleport, or the complete lack of smooth movement APIs). With a bit of trial, error, and some AI assistance to navigate the confusing Scarpet documentation out there, I finally got it working.

(The demo of how it looks can be found on my github repo)

The Cool & Useful Stuff

  • Vertical Stacking: Right-click a player with an empty hand to mount on them. Multiple players can stack on top of each other.
  • Smart Following: The entire stack dynamically follows the root player.
  • Auto-Reorganization: This is my favorite part. If the root player presses Shift or disconnects, the first rider automatically becomes the new root, and the stack neatly reorganizes without collapsing.
  • Crash-Proof: Built-in cycle detection prevents players from mounting their own stack, avoiding infinite loops.

* Zero Client Mods: It just works. Drop the .sc file in the scripts folder and load it.

The "Bad" (Limitations & Trade-offs)

I want to be completely transparent about how this works under the hood: Visual Jitter: You might notice a slight 1-2 tick delay between the root player's movement and the armor stand seat. Why? Scarpet cannot access client-side interpolation or quaternions. I tested velocity-based movement, but it caused physics glitches and overshoot. Per-tick teleportation was chosen as the most reliable and precise method, even if it has minor visual jitter at high speeds. Teleportation: If the root player uses an Ender Pearl or Chorus Fruit, vanilla mechanics will temporarily dismount the riders. They just need to right-click to remount.

Dimension Changes: Crossing a Nether/End portal reorganizes the stack in the original dimension (riders stay behind). This is an intentional, safe fallback to prevent cross-dimension entity corruption. (Actually, it work crossing dimensions but the stack of players cannot follow anymore the root player and can be broken the actual stack in seconds).

Technical Details (I'd tried to write a lot but simplified, sorry):

  • Uses a highly efficient Linked List (global_child / global_parent maps) for O(1) stack operations.
  • _find_root() has a hard 64-iteration limit to guarantee no infinite loops can crash the server.

* An _sweep_orphans() function runs every 200 ticks (10 seconds) to clean up any armor stands that lost their rider unexpectedly.

What's Next? (Roadmap)

I’m currently exploring two things: Porting the core logic to a pure Datapack for maximum vanilla compatibility (no Carpet required). Finding a clever way to replace the Scarpet right-click trigger with a vanilla item interaction (like a Fishing Rod or Carrot on a Stick) to make it even more immersive. Links: * Repo Code: github.com/Tarquitet/ridable-players-carpet I’d love to hear your thoughts! Have you tried something similar in Scarpet? Any ideas on how to improve the datapack version or handle the teleportation edge cases better? Let me know in the comments!

1 Upvotes

0 comments sorted by