Step 2

Creating our Loop


Next, let’s add the code as shown to create our conditional loop.

Here, our seeds variable needs to be greater than 0, as soon as it becomes 0 the loop will end.

Inside our loop, we make sure we are constantly getting the position of our player using “getPos”.

We also make sure we are constantly getting the block that the player is standing on by using “getBlock”.

Next, we’ll work on adding in our if statement.