Minecraft Modding For Kids For Dummies
Book image
Explore Book Buy On Amazon

After you have set up the initial scene, you can use the scene for a Minecraft game. The arena function stays the same, but you add a melon block on the opposite side of the arena from the player.

This shows the new function, SetupGame, which creates the arena, places the melon block, and puts the player in the starting position.


To add a melon block, follow these steps:

  1. Create the SetupGame function and add a call to SetupGame to main.

  2. Add a new drone named d and move it to one side of the arena. The drone should move only 18 blocks because the stone and the fence occupy 2 of the blocks and you want the player to be inside the fence.

  3. Move the drone up by 2 so that the player starts above the platform and falls into the arena.

  4. Move the player to the location of the drone. Now the player is at the starting position.

  5. Move the drone to the opposite side of the arena. Moving the drone 33 blocks leaves 2 blocks empty between the melon block and the fence.

  6. Place the melon block and move the drone backward by 1 block.

At this point, nothing happens when the player breaks the melon block.

About This Article

This article is from the book:

About the book authors:

Sarah Guthals, Ph.D. is the CTO of ThoughtSTEM and has dedicated her life to coding education.

Stephen Foster, Ph.D. is the CEO of ThoughtSTEM, a company that teaches computer science to kids across America.

Lindsey Handley, Ph.D. is the COO of ThoughtSTEM and has hundreds of hours of experience as a classroom instructor for Minecraft based science and computer science classes.

This article can be found in the category: