4

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?

4

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}}
  • is there a way I could freeze the entity until the player boards the boat and/or minecart? – DatEpicCoderGuyWhoPrograms Apr 26 '14 at 21:46
  • @user3487713 You could set the entity's movement speed to 0 using Attributes. I haven't tried it with flying mobs, so I don't know if it works properly. – Kendall Frey Apr 27 '14 at 2:20
  • You can also do /effect target slowness lengthOfTime 30 to make them unable to move. – C. Yang Oct 23 '16 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.