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

After you have completed an iteration of the Spleef game, you can repeat the gameplay loop and make the Minecraft game more fun, challenging, and unique. Here, you will be taken through four examples in each of the parts of the gameplay loop so that you can

  • Add a lava platform underneath the diamond arena.

  • Challenge your player to destroy 200 blocks.

  • Add in an enemy.

  • Add fireworks into the game.

Start: Add a lava platform

After you have a working game, you can add to the scene to make it more interesting. In this section, you learn how to add a platform of lava below the arena so that a player who falls through the platform falls into a lava pit.

Because you’re using the ArenaBuilder library, the change to the Spleef code is minor. The image below shows you what to call to add to the arena function.


This is the scene you will see.


Goal: Destroy at least 200 blocks

Because you’re already counting the number of blocks that the player destroys as a part of the Reward phase in Iteration 1, you can easily add a bit of code to the removeBlock function to congratulate the player on becoming a Master Spleefer.


Challenge: Add an enemy

You can easily add an enemy into the arena by using the melon block as the spawning point. This shows how to spawn a creeper in a random spot in the arena. Then the player has to avoid the creeper and try not to fall before gaining at least 200 blocks.


Here is the player approaching the creeper.


Reward: Add fireworks

Finally, you can make the reward a little more interesting: Rather than congratulate players, you can give them a fireworks show! This image shows how to add the Fireworks block into the removeBlock function.


You can find the Fireworks block under the World category.


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: