How to Make a Rocket Ship in Vanilla Minecraft - Pastebin.com
In this tutorial I will be showing you how to create your very own rocket ship in your vanilla Minecraft world using somewhat simple command block mechanics!
To get started, run this command where you want the seat of the rocket ship to be:
/summon MinecartRideable ~ ~-0.5 ~ {Tags:["rocketship"],NoGravity:1b}
We will use this to detect the borders of the rocket ship and run our commands relative to this point. Now we need to detect when the player is actually sitting in the seat. Run these commands on the main repeat clock:
1. scoreboard players tag @a[tag=inRocket] remove inRocket
2. execute @e[tag=rocketship] ~ ~ ~ scoreboard players tag @a[r=1] add inRocket {RootVehicle:{Entity:{id:MinecartRideable}}}
This system gives the player a tag when they are sitting inside of the seat which we can use to execute other commands off them. The first one is constantly removing the tag, while the second one is adding the tag when the player meets the requirement of sitting in the seat immediately after, causing them to not have the tag whilst not meeting the requirement. Now we need to make the rocket ship actually move upwards. We want it to actually have a set speed, and not go up as fast as it can, so for this we need a timer. To create a timer, let's create a scoreboard objective using this command in chat:
/scoreboard objectives add rockettimer dummy
We already know when the player is sitting in the seat because of the 'inRocket' tag that we gave them previously, so now we need to execute on all players with this tag and constantly add a score on the rockettimer objective to the minecart seat using this command on the chain:
execute @a[tag=inRocket] ~ ~ ~ scoreboard players add @e[tag=rocketship,r=1] rockettimer 1
Now, we need to make the rocket ship move up after a set amount of time. We can use these commands on a chain to do so:
1. execute @e[score_rockettimer_min=10] ~ ~ ~ clone ~3 ~-4 ~3 ~-3 ~7 ~-3 ~-3 ~-3 ~-3 force move
2. tp @e[score_rockettimer_min=10] ~ ~1 ~
3. scoreboard players set @e[score_rockettimer_min=10] rockettimer 1
All these commands will execute on the minecart when the timer has a score of ten (about 0.5 seconds). The first clones all of the rocket ship blocks upwards, the second teleports the minecart and the player up with it, and the third resets the timer to repeat the whole process. Depending on the size of your rocket ship, you are going to want to change the first command. The ~ means relative, so those coordinates are run relative to the seat, meaning that the bottom corner for my rocket ship is 3 blocks in the positive X, 4 blocks in the negative Y, and 3 blocks in the positive Z. The first three ~ represent the bottom corner of the ship, the next three represent the top corner of the ship, and the last three represent the northwest bottom corner of where the ship is moved to (one block upwards). Now we need the rocket ship to go downwards. To avoid using another scoreboard, we are going to use the same one but with it counting down instead of up. To do this, we need to add this command to our chain:
execute @e[tag=rocketship] ~ ~ ~ execute @p ~ ~ ~ execute @a[r=0,tag=!inRocket] ~ ~ ~ execute @e[tag=rocketship,c=1] ~ ~ ~ detect ~ ~-5 ~ air 0 scoreboard players remove @e[tag=rocketship,c=1] rockettimer 1
This command is executing on the nearest player to the ship, checking to see if they are sitting in the seat, and then if they aren't, it will test if there is air underneath the ship. If everything meets these requirements, then it will remove one score from itself on the rockettimer scoreboard. If your ship is a different size, then you need to testfor a different air position. Simply change the '-5' in 'detect ~ ~-5 ~' to however many blocks there are between the seat and the ground. Next, we need to move the move the rocket ship down after half a second. We can do this by adding these command to the chain:
1. execute @e[score_rockettimer=0] ~ ~ ~ clone ~3 ~-4 ~3 ~-3 ~7 ~-3 ~-3 ~-5 ~-3 force move
2. tp @e[score_rockettimer=0] ~ ~-1 ~
3. scoreboard players set @e[score_rockettimer=0] rockettimer 9
These commands work exactly the same to moving the ship up, except the clone and teleport commands will move the ship, seat, and player downwards. The last one again resets the timer to be ready to repeat the process. The last small command will just make it so that you can't push the seat around and mess up the system. Add it to the end of your chain:
entitydata @e[tag=rocketship] {Motion:[0.0,0.0,0.0]}
That's all that you need to know to create your very own rocket ship in vanilla Minecraft! As an extra challenge, you can try to add some particles and sound effects, but I'll leave that up to you guys to figure out on your own. Good luck! :D
-
Latest
Scientist Explains How the Universe 'Talks to Us'
Life as we know it can be traced all the way back to some four billion years ago – in which time some single-cell organism, not much more conscious than a rock, evolved into miraculous and various lif...
-
Next
Use These 6 Crystals to Connect with the Universe
"], "filter": { "nextExceptions": "img, blockquote, div", "nextContainsExceptions": "img, blockquote"} }">Crystals have this amazing ability to help connect us with the energy of the universe....
Popular Articles
- Rocket Power (TV Series 1999–2004) - Rocket Power (TV Series ...
- technique - What is the definition of 'playing in the pocket ...
- "Pocket rockets," in poker Crossword Clue Answers, Crossword ...
- 5 Sex Toys Every Man Should Own, Use & Use Again - LA Weekly
- Pocket Holsters: 11 Options For Easy Everyday Carry (2021 ...
- What is Elton John's most successful song? (Celebrity Exclusive)