• No products in the cart.

Making rain

$1.00

Students will learn about On Chat Command functions into the Minecraft game to execute, or run a function.

SKU: 1310 Category:

Description

Students will learn about On Chat Command functions into the Minecraft game to execute, or run a function. Game/Play NGSS Minecraft Project-Based courses Online 

Learning Objectives

  • Learn about functions in computer science.

Guiding Ideas

In computer science, a “function” is a way to group commands together. For example, the function of Waving might group the following commands together:

  • Raise hand
  • Move hand left
  • Move hand right

Student Activities

From the Player Toolbox drawer, drag and drop the On Chat Command block onto the

coding Workspace.

Rename this command to “rain”

From the GamePlay Toolbox drawer, drag and drop the Weather block onto the coding Workspace.

Drag the Weather block under the On Chat Command event

Using the drop-down menu, change the weather to rain

In your Minecraft game, press ‘t’ to open the chat screen. Type “rain” and press Enter. You should see it start raining in Minecraft!

From the Mobs Toolbox drawer, drag and drop the Spawn Animal at Position block onto the coding Workspace.

Drag the Spawn Animal at Position block under the On Chat Command event

Use the Animal block drop-down menu to select an ocelot

Right-click on the Spawn Animal at Position block to open the context menu, and select Duplicate to copy the block

Drag the second Spawn Animal at Position block underneath the first

Use the Animal block drop-down menu on the second Spawn Animal at Position block to select a wolf

Our Rain function will now spawn 1 ocelot and 1 wolf at the Player’s position before making it rain. Let’s use a parameter and a loop to spawn multiple animals. From the Loops Toolbox drawer, drag and drop the Repeat block onto the coding Workspace.

Position the Repeat loop under the On Chat Command block, and drag the 2 Spawn Animal at Position blocks inside the Repeat loop

Click on the blue cog/gearwheel icon in the On Chat Command block, drag and drop a number parameter block under the Command Arguments block. This will create a number parameter for our Rain function. Click on the blue cog/gearwheel icon again to close the Parameters menu.

From the Variables Toolbox drawer, drag and drop the number block onto the coding Workspace.

Drag the number block into the Repeat loop block

Let’s change the position where our Ocelots and Wolves are spawning. Right now, they are spawning at the Player’s position at ~0 ~0 ~0. From the Positions Toolbox drawer, drag and drop a Pick Random Position block onto the coding Workspace.

We want our animals to spawn 5 blocks above our Player, and at random locations 10 blocks all around our Player. Set the values of your Pick Random Position block according to the following:

Right-click on the Pick Random Position block to open the context menu, and select Duplicate to copy the block

Drag and drop the 2 Pick Random Position blocks into the Spawn Animal at Position blocks. Your completed program should look like this:

In your Minecraft game, press ‘t’ to open the chat screen. Type: “rain 4”. You should see it start raining 4 ocelots and wolves all around you in Minecraft! Now try typing different numbers into your Rain function: “rain 40”, or “rain 400”.

Performance Expectations

  • Ask students to create functions that help them accomplish a task in Minecraft.
  • Ask students to work in pairs to create a helpful function for Minecraft.

Skills

  • Creativity
  • Critical Thinking

Course Page

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

About

We are a K-8 STEM school/ tutoring service, using Project Based Learning based on Next Generation Standards. We connect teachers with their students while providing the most engaging learning environment.We know our students LOVE us (duh! - for them is playing Minecraft), we also know our Teachers LOVE us (so easy to teach), and, finally, our Parents LOVE us - as they see their kids happy AND learning stuff.

Who’s Online

There are no users currently online

Start Minecraft

Start MS Teams

top
©️ 2021 EduMEE Minecraft Schooling, Inc. All rights reserved. Not an official Minecraft product. Not approved by or associated with Mojang.