This tutorial assumes you have already installed Minecraft Link in your Minecraft Client. If this is not the case, please first read the installation tutorial for the Minecraft Link for Minecraft.
Installation of Minecraft Link on Raspberry Pi
Minecraft Link for Raspberry Pi supports all Raspberry Pi boards, BananaPi, and BananaPro boards and Odroid boards. Minecraft Link needs Raspbian OS to be installed on your Pi in order to properly work.
- Install the latest version of the Raspbian on your Raspberry Pi
- Run the following command in the terminal on your Raspberry Pi connected to the internet:
curl -sL https://mcreator.net/linkpi | sudo bash
- After the setup is complete, the service called minecraftlink will be automatically started
- You can verify if the service is running properly by entering the following command
sudo service minecraftlink status
- You can connect to your Raspberry Pi via Minecraft Link Minecraft interface if the computer and the Raspberry Pi are on the same network
Connecting to Raspberry Pi from Minecraft Link
Once the Minecraft Link service is installed on the Raspberry Pi, we can connect to it from Minecraft.
- Launch the Minecraft with Minecraft Forge and Minecraft Link installed
- On the home screen, press L to open Minecraft Link window
- Make sure that your Raspberry Pi is on the same network as the Minecraft you are using to connect to Pi from
- Wait a few moments on the Minecraft Link screen so the Raspberry Pi gets recognized. If it does not appear on the screen, click on the IP connect button and enter the IP of your Raspberry Pi (Raspberry Pi IP address) and click Connect to manually connect to your Raspberry Pi
- If the connection is successful, the green CONNECTED text will be shown next to the selected device
Verifying the connection
We can verify the connection by opening one of the Minecraft Worlds with cheats enabled. Once you are in the world, enter the following command in the chat:
When you execute this command, the name of the connected device should be shown. The number of digital and analog pins should be shown too.
Basic pin control test
To do a basic test, connect LED to the GPIO as shown on this website.
We can use this LED to test if the connection to the Minecraft Link is working. First, we need to set the pin 1 to the output mode, so it can control the LED power state. Enter the following command in the Minecraft Chat:
/link pinmode 1 out
Next, we turn the LED on:
/link digitalwrite 1 1
We set the pin 1 to the high state (1). The onboard LED should turn on. We can now turn it back off by entering the following command:
/link digitalwrite 1 0
Minecraft Link for Raspberry Pi uses pi4j Java mapping of wiringPi software. Pin mappings for your device can be found on the following links:
- Raspberry Pi - Model A
- Raspberry Pi - Model A+
- Raspberry Pi - Model B (Rev 1)
- Raspberry Pi - Model B (Rev 2)
- Raspberry Pi - Model B+
- Raspberry Pi - Compute Module
- Raspberry Pi - Compute Module 3
- Raspberry Pi 2 - Model B
- Raspberry Pi 3 - Model B
- Raspberry Pi 3 - Model B+
- Raspberry Pi Zero
- Raspberry Pi Zero W
- Lemaker BananaPi
- Lemaker BananaPro
- Odroid C1/C1+
- Odroid XU4
Now that you have successfully connected your Arduino, you can start making your fist Minecraft Link compatible mod.
- If you would like to develop Minecraft Link mod inside MCreator, read the Minecraft Link procedures tutorial
- If you would like to learn more about Minecraft Link commands, check Minecraft Link commands reference
- If you would like to manually code mod for Minecraft Link, check its API getting started guide