COsiecki Posted February 14, 2013 Report Share Posted February 14, 2013 I have written a LabVIEW version of the API for Minecraft on the Raspberry Pi. I used the API spec sheet and the sample python code provided by Mojang to make my version. I have uploaded it to the NI example code section. There's enough people here who like to use LabVIEW in unique ways, so I thought someone might like it. Any feedback is also welcome. Example code link: https://decibel.ni.com/content/docs/DOC-26662 Quote Link to comment
curiouspuya Posted February 14, 2013 Report Share Posted February 14, 2013 This is great. I tried getting it to work but couldnt get a connection. Any instructions on how to get it to work? Quote Link to comment
COsiecki Posted February 15, 2013 Author Report Share Posted February 15, 2013 (edited) First, you have to be running the Pi edition of Minecraft on a Raspberry Pi on the same subnet as your LabVIEW code. This doesn't work with the full version of Minecraft. You can download Minecraft for the Raspberry Pi at http://pi.minecraft.net. Once its installed, start a game and load a world. This will start a server in the background. In the Minecraft-Pi library, you create a Minecraft-Pi object using Init.vi in the Connection Methods folder. You call it with the IP address of the Raspberry Pi running Minecraft. Once you have created the object, use Connect.vi to connect to the server. From there, if it didn't error, you are connected until you call Close.vi. You can use any of the other methods to set or read the available values. I included the "mcpi-protocol-spec" text file to explain how the functions work. Beyond that, make sure you can ping your Raspberry Pi and that your networking isn't blocking the ports. The Minecraft-Pi server uses port 4711. Edited February 15, 2013 by COsiecki Quote Link to comment
Wire Warrior Posted February 20, 2013 Report Share Posted February 20, 2013 Yet another reason to load Minecraft onto my Raspberry Pi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.