Jump to content

Minecraft-Pi API in LabVIEW


COsiecki

Recommended Posts

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

Link to comment

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 by COsiecki
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.