Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#Minecraft Pi API
##Martin O'Hanlon (martin@ohanlonweb.com)
##http://www.stuffaboutcode.com
# Minecraft Pi API
## Martin O'Hanlon (martin@ohanlonweb.com)
## http://www.stuffaboutcode.com

IN PROGRESS

##Description
## Description
Minecraft: Pi Edition contains a really simple, but surprisingly versatile API that allows programmers to interact with the Minecraft world in real time using code.

Since its release the api has been migrated to other Minecraft implementations (e.g. Bukkit, Canarymod, Forge) as well as being extended
Expand All @@ -16,11 +16,11 @@ This repository:
* provides information about compatibility across versions
* holds the language specific (e.g. python, java) modules which allow programmers to access the api and its extensions

##Implementations
## Implementations

Todo - Links to information about the different implementations of API.

##Structure
## Structure
* [api](api.md) - documentation which describes the api, its versions
* original documentation
* python
Expand All @@ -33,8 +33,8 @@ Todo - Links to information about the different implementations of API.
* minecraft-pi-edition-LICENSE.txt - original minecraft pi edition LICENSE
* others...

##Contributors
## Contributors
* (Martin O'Hanlon)[https://github.com/martinohanlon]

##Version history
* 0.1 - in progress
## Version history
* 0.1 - in progress
24 changes: 12 additions & 12 deletions api.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#Minecraft Pi API
# Minecraft Pi API

IN PROGRESS

##Description
## Description
The Minecraft Pi API is a 'server' based api where a client connects to a server and sends api command via TCP/IP. Each command is a string sent in clear text to the server which then executes that command.

Some of the information presented here is taken from the original (mcpi_protocol_spec.txt)[resources/mcpi_protocol_spec.txt] document which was distributed with Minecraft: Pi Edition

##Implementations
## Implementations

TODO - descriptions of the implementations

##Protocol
## Protocol
The mcpi-protocol enables an external process (program) to interact with a running instance of Minecraft Pi API.

The protocol can easily be implemented and used from any programming language that has network socket support.

* Tcp-socket, port 4711 (in some implementations this can be changed)
* Commands are clear text lines (ASCII, LF terminated)

##Definitions
## Definitions
x,y,z -- vector of three integers.
xf,yf,zf -- vector of three floats.
blockTypeId -- integer. 0 is air.
blockData -- integer 0-15. Block data beyond the type, for example wool color.

##Co-ordinate System
## Co-ordinate System
Most coordinates are in the form of a three integer vector (x,y,z) which address a specific tile in the game world. (0,0,0) is the spawn point sea level. (X,Z) is the ground plane and Y is towards the sky.

##Commands
## Commands

Commands are categorised by their status as:
* Official - part of the Minecraft: Pi Edition api and officially support by Mojang
Expand All @@ -39,7 +39,7 @@ If changes are made to the official implementation which supercede standard or e

No all commands are supported in all implementations, see the compatability table below.

###Official
### Official

world.getBlock(x,y,z) --> blockTypeId

Expand Down Expand Up @@ -81,7 +81,7 @@ No all commands are supported in all implementations, see the compatability tabl

events.block.hits() --> [pos,surface,entityId]

###Standard
### Standard

world.getBlocks --> [blockType]

Expand All @@ -97,12 +97,12 @@ No all commands are supported in all implementations, see the compatability tabl

events.chat.posts() --> [entityId,mesage]

###Extension
### Extension

world.spawnEntity(type,x,y,z,tags) --> entityId
world.removeEntity(entityId)

##Compatability
## Compatability
O - Official
S - Standard
E - Extension
Expand Down Expand Up @@ -150,4 +150,4 @@ entity.setPitch | S | Y | Y | Y | N
events.block.hits | O | Y | Y | Y | Y
events.chat.posts | S | N | Y | Y | N
world.spawnEntity | E | N | N | Y | N
world.removeEntity | E | N | N | Y | N
world.removeEntity | E | N | N | Y | N