This is a MakeCode Extension for Minecraft Education that allows you to create minecart roller coasters using code, then ride them!
In Minecraft, the player has the ability to place rails and powered rails in the world. Minecarts can then be placed on top of rails and will follow the track that has been laid out. Powered rails, when activated with redstone, accelerate the minecart. Regular rails will simply guide it, but the cart will eventually slow down on them.
With this extension, you don't have to worry about the specifics of powering and unpowering rails - it handles all of that for you to ensure your roller coaster will never stop in its tracks (unless you want it to)! It will also ensure the roller coaster has enough vertical space to fit the player and will even protect the coaster from water and lava!
Once you've created a minecart roller coaster, you're free to ride it! The track should automatically have a minecart at the starting zone, but if you've already ridden it once (or destroyed the minecart) you can always place a new one on the track by adding a minecart to your hotbar, selecting it, and right clicking on the track. Once the minecart is in place, right click to enter it. Then press (right click) the blue button on the pink wall to activate your minecart and begin the ride!
To begin, start a new project in Microsoft MakeCode for Minecraft Education and select the Extensions button in the toolbox.
Then select the Roller Coaster Builder extension from the list of recommended options:
Now find the Roller Coaster category in your toolbox (postition may vary):
To build your minecart roller coaster using this extension, you will construct your track segment-by-segment using code. All tracks should start with a Begin Track block, then you can append any number of segments, then finish the track with a Place Track End block. You can also use code to customize certain elements of the track, like the base block and power interval.
These blocks are used to construct the track. Each block adds the specified segment, picking up where the previous block left off.
This block constructs a starting zone for your roller coaster, including a small backing wall, a minecart, and a "launch button". All tracks should start with this block.
This block places a final stopping area for your roller coaster, which will bring the minecart to a halt.
This adds a straight line of the specified length to your roller coaster. If you expand the block, you can select a power level for the segment:
This adds a ramp up or down to your roller coaster. By default, it will slope 1 block up/down for every 1 block forward, but if you expand the block, you may specify a more gradual slope by increasing the number of blocks moved forward for every 1 block moved vertically.
This adds a 90 degree turn to your roller coaster in the specified direction.
This adds a corkscrew-like spiral to your roller coaster, turning in circles while moving up or down. The width specifies how large the circles will be while the height specifies how far up or down the corkscrew will go.
This adds a drop in your roller coaster, where the minecart will free-fall the specified distance and land on a rail at the base of the fall. The track resumes from there.
This adds a single powered rail to your track. Powered rails cause the minecart to accelerate.
This adds a single non-powered rail to your track.
These blocks allow you to change features of your track, like the base block and power interval. They will only apply to track segments added after the block runs. They do not apply retroactively.
This defines the block that will go beneath all of your rails.
This block defines how often a powered rail is inserted into your track. A smaller interval means you will have powered rails more often, making your roller coaster faster.
These blocks enable or disable the glass barrier that gets constructed when your track goes into water or lava. If the protection is disabled, water and lava may destroy your track, but the build will complete faster.
To view a sample roller coaster project, import this URL: https://makecode.com/_J1K7zk4VqVfr
Run the code and type "Build" into chat ("T" to open) to construct the roller coaster!