Bigjango13 / MCPI-Addons

Addons to the MCPI api.
17 stars 5 forks source link

MCPI Addons

A Minecraft Pi Edition: Reborn mod to add more features to the API.

Note: requires Reborn v2.4.8 or later.

Installing

First you will need to install the frontend from pip, to do that you can use pip3 install mcpi-addons. If you don't want to (or can't) compile the backend then you can grab the newest version from the releases page.

Compiling

Just run ./build.sh to create the binary and run mv libextrapi.so ~/.minecraft-pi/mods to install the mod, this is needed because MCPI doesn't support any of these extensions that this api adds, so a C++ mod is loaded to intercept CommandServer::parse.

How to use

Here is a simple "Hello World" example:

# Import the api
from mcpi_addons.minecraft import Minecraft
# Initialize the api (MCPI must be open and in a world at this time)
mc = Minecraft.create()

# Post to chat
mc.postToChat("Hello world!")

For a tutorial see the 'Using the API' section of stuffaboutcode.com.

What does it do?

It adds these:

I want to add more so please give me suggestions.

Todo list

I am going to add theses features someday, but they aren't here now. Feel free to create a PR that adds them or other features!

Known bugs

Extras

Raspberry Juice compatibility

One day all of these will be supported.

Particles

Particles are client side and only shown if the player is within 16 blocks. Here is a particle list I found at 0x107511 in minecraft-pi

Tiles/Items

A list of tiles can be found here and a list of items here.

Entities

A list of entities can be found here.

Changelog

Screenshots

Here is a screenshot of using overrides and particles:

Here is a screenshot of using entity spawning with arrows and direction:

Here is a screenshot of using TNT entities and falling bedrock entities to make a cannon: