Step 1

Program Setup


In the last project, we learned how combine infinite loops with if statements and functions to create a program that placed fire on certain blocks.

In this project, we are going to practice combining all of these elements together once more; however, this time we will use a conditional loop instead of an infinite loop. This will allow our loop to automatically come to a stop when we want it to.

With all of this, we will make a program that plants seeds whenever we walk on a grass block, and stop once we have planted a certain number of seeds, making our farming process super easy!

First add the code to your project as shown, feel free to change the “seeds” variable if you’d like. This will control how many seeds get planted with the program.