Skip to content

Instantly share code, notes, and snippets.

@leesalminen
Last active July 22, 2022 14:51
Show Gist options
  • Save leesalminen/0e8d55b33f07dca476934822503de6ee to your computer and use it in GitHub Desktop.
Save leesalminen/0e8d55b33f07dca476934822503de6ee to your computer and use it in GitHub Desktop.
install Minecraft pi on raspberry pi os
wget -O minecraft-pi.AppImage https://tinyurl.com/jamcpi
chmod +x minecraft-pi.AppImage
pip3 install mcpi minecraftstuff
touch minecraft-bot.py
echo "from mcpi import minecraft" >> minecraft-bot.py
echo "from minecraftstuff import MinecraftTurtle" >> minecraft-bot.py
echo "mc = minecraft.Minecraft.create()" >> minecraft-bot.py
echo "mc.postToChat(\"Hellooooo\")" >> minecraft-bot.py
echo "pos = mc.player.getTilePos()" >> minecraft-bot.py
echo "steve = MinecraftTurtle(mc, pos)" >> minecraft-bot.py
echo "steve.forward(5)" >> minecraft-bot.py
echo "steve.right(90)" >> minecraft-bot.py
echo "steve.forward(5)" >> minecraft-bot.py
echo "steve.right(90)" >> minecraft-bot.py
echo "steve.forward(5)" >> minecraft-bot.py
echo "steve.right(90)" >> minecraft-bot.py
echo "steve.forward(5)" >> minecraft-bot.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment