I'm following the tutorial here for using Python2 to interact with Minecraft Pi. Everything is fine up until the "Blocks as Variables" section. Here is my code:
from mcpi import minecraft from time import sleep mc = minecraft.Minecraft.create(); dirt = block.DIRT.id
But running this code gives the error for the
NameError: name 'block' is not defined
How do I fix this?