Minecraft – Stacking player on mobs

minecraft-java-edition

Is there a way to stack a player on a mob such as a bat, and then have the player able to control the bat? Like moving up and down? Or is this just not possible yet in vanilla minecraft? Here is what I already know how to do:

/summon <entity> ~ ~ ~ {riding:{id:<entity>}}

Also, how could I make it so when the player wants to get off, they can get off?

Best Answer

The ability to control entities that you are riding (other than specifically programmed ones like horses) is simply not in the vanilla game. You could technically move it with a lot of teleporting command blocks, but it would not be based on what keys you pressed.

Stacking a player onto a mob directly is also not really possible. However, you could summon a rideable pig, minecart, boat or tamed horse on top of the entity stack, and then just have the player right click on that to get on. Getting off would just be the dismount key. For example:

/summon Boat ~ ~ ~ {riding:{id:Bat}}

/summon MinecartRideable ~ ~ ~ {riding:{id:Bat}}