Tuesday 11 June 2013

Programming Minecraft with Bukkit & Raspberry Juice

Ever wanted to create your own programs for the full version of Minecraft, but the lack of an API, is a challenge.  Well with Bukkit (a custom server for Minecraft) and a plugin called Raspberry Juice, which emulates the API you get with Minecraft: Pi Edition you can.

Download and Install Bukkit
  • Create a folder for Bukkit, anywhere it doesn't matter
  • Head over to http://dl.bukkit.org and download the latest version of Bukkit, note that if you want to use the latest version of Minecraft, you might need to download the Beta Build and save the .jar file to the folder.
  • Rename the downloaded .jar file from craftbukkit-#.#.#-R#.#.jar to craftbukkit.jar
  • Open Notepad, insert the following text:
java -Xms1024M -Xmx1024M -jar craftbukkit.jar -o true
PAUSE
  • Save the file in the folder as run.bat
Run Bukkit

Double click run.bat

Test Bukkit

Open Minecraft, Multiplayer, Direct Connect, Type "localhost", Join Server

You can stop bukkit by typing stop in the bukkit command window

Download and Install Raspberry Juice
If everything has gone to plan you should see a message when you start up bukkit that RaspberryJuice has been enabled.


Now, you can run the programs you created for Minecraft: Pi Edition on the full edition of Minecraft. 

Minecraft Analogue Clock running using Bukkit and Raspberry Juice


Limitations
The raspberry juice plugin doesn't currently support all the functions of the Minecraft: Pi Edition API, see http://dev.bukkit.org/bukkit-mods/raspberryjuice/ for a list of supported functions.


9 comments:

  1. Really cool! How do you run your python files, though? I've been trying to find out for a long time!

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Does not work!!!
    cmd says:
    unable to access jarfile craftbukkit.jar

    ReplyDelete
  4. I am getting an import error "ImportError: No module named 'connection'" And I have tried several things to try to run the programs but it doesn't work, help please.

    ReplyDelete
    Replies
    1. Are you using Python 3? The python api library from mojang only works with Python 2.

      Delete
  5. I've set this up but I can't find any tutorials on how to use it :/ not sure where to put the python file and how to use it with the raspberry pi(I have bukkit and raspberry juice on the pi).

    Any help would be very helpful :)

    I want to use this plugin to control the GPIO on the raspberry pi :) so I can move the redstone logic to a breadboard.

    ReplyDelete
  6. You can use Bukkit in the same way you would use Minecraft: Pi edition.

    If bukkit and juice is install on your Pi it should be pretty easy as the mcpi python libraries are installed by default with Raspbian.

    Create a simple program:

    from mcpi.minecraft import Minecraft
    mc = Minecraft.create()
    mc.postToChat("hi")

    Save it anywhere on your Pi and run it! If your connect to Minecraft server on the Pi you should see the message.

    ReplyDelete
    Replies
    1. Thanks for the reply :) got it working now.

      I think the first thing I'm going to make is a script that allows you to type in /Python [File].

      Delete

Note: only a member of this blog may post a comment.