Skip to content

Commit

Permalink
Merge pull request #32 from Mojang/computing-mc-fixes
Browse files Browse the repository at this point in the history
Computing with Minecraft fixes
  • Loading branch information
gbaman authored Jul 19, 2022
2 parents 8a82d58 + 77db44c commit a16bac2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion computing/unit-4/lesson-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ player.onChat("ocelot_wall", function () {
```

## Step 10
Run the code to build the walls.Test your code. ``||Builder:BUILDER||`` should now start at position **--40, 69, -575** and move West by **21** blocks, turn **left** and move **9** blocks while placing **Stone Bricks** on the way. The result is a small perimeter wall around your ocelot enclosure. You'll see this happens very fast in comparison to ``||Agent:Agent||`` and ``||Blocks:BLOCKS||`` in previous lessons. With a little preplanning, you can create huge structures in seconds.
Run the code to build the walls. Test your code. ``||Builder:BUILDER||`` should now start at position **-40, 69, -575** and move West by **21** blocks, turn **left** and move **9** blocks while placing **Stone Bricks** on the way. The result is a small perimeter wall around your ocelot enclosure. You'll see this happens very fast in comparison to ``||Agent:Agent||`` and ``||Blocks:BLOCKS||`` in previous lessons. With a little preplanning, you can create huge structures in seconds.

## Step 11
Add fencing and other details. This wall won't keep ocelots in, let's add fencing above to make sure they don't escape.
Expand Down
11 changes: 10 additions & 1 deletion computing/unit-5/lesson-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Wind turbines make up a wind farm. A ***wind turbine*** is like a windmill, wher
```template
player.onChat("run", function(){
})
player.teleport(pos(19, 79, -413))
player.teleport(world(19, 79, -413))
```

## Step 2
Expand Down Expand Up @@ -39,5 +39,14 @@ player.onChat("run", function () {
while (true) {
}
builder.teleportTo(world(-40, 69, -575))
builder.face(WEST)
builder.move(FORWARD, 21)
builder.turn(RIGHT_TURN)
builder.move(FORWARD, 9)
builder.tracePath(OAK_FENCE)
builder.place(GRASS)
builder.mark()
builder.fill(GRASS)
})
```
4 changes: 2 additions & 2 deletions computing/unit-5/lesson-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Lesson 2: Animate the Wind Farm

## Step 1
Code three model blades. In Minecraft, ensure your player is at your wind farm, which should be near the following coordinates: **19, 79, -413**. If needed, use the slash command to teleport your player to the position by typing **/tp 19 79 -413** and selecting **Enter**.
Code three model blades.

Find a space away from your wind farm to create secret models that will be used for the animations. For this activity you can do this high up in the sky or dig a chamber underground, or just make sure they're far enough away so they won't be seen.
Find a space away from your wind farm to create secret models that will be used for the animations. These can be anywhere in the world, just ideally make sure you can't see them from up on the hill.

Create your first model of the turbine blades in one specific position of rotation. In our example below, we've made the blades in **Yellow Wool**, but you can make these from anything you wish. You must create these in the direction you want them to appear in final animation, so build them facing the way you want to see them when they finally appear at the end of this lesson.

Expand Down
5 changes: 3 additions & 2 deletions computing/unit-5/lesson-3.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
### @explicitHints 1
# Lesson 3: Code a Lighting System

## Step 1
Code a wind indicator. The first thing we need to do is to create the illusion that the blades of the turbines are not always turning. Like there is not always enough wind to do this, as is the case in real life.

Use the starter code and change the value for the ``||loops:repeat||`` element from **4** to **10**.

``` template
```template
player.onChat("wind_turbine", function () {
for (let index = 0; index < 4; index++) {
blocks.clone(
Expand Down Expand Up @@ -364,4 +365,4 @@ loops.forever(function () {
})
```
## Step 15
Run your code. Test your code. Your blades should now be turning 20 times, before stopping for 5 seconds and doing this on an endless loop. Your **Redstone Lamp** should light up only when the blades are turning. If it doesn't work, go back to review your code and make adjustments as needed. Then you can repeat the steps for your other turbines.
Run your code. Test your code. Your blades should now be turning 20 times, before stopping for 5 seconds and doing this on an endless loop. Your **Redstone Lamp** should light up only when the blades are turning. If it doesn't work, go back to review your code and make adjustments as needed. Then you can repeat the steps for your other turbines.

0 comments on commit a16bac2

Please sign in to comment.