I believe some standardisation would be useful on that point.
Project | Format |
---|---|
SpockBot | python dictionary |
minecraft-data (used by node-minecraft-protocol) | json defined by a json schema |
hematite | rust macro |
darkbot | xml |
{ | |
"Oak Wood Planks": [ | |
{ | |
"output": 4, | |
"recipe": [ | |
null, | |
null, | |
null, | |
null, | |
"Oak Wood", |
if [[ $# -ne 2 ]] | |
then | |
echo "usage : $0 <outputFile> <repo>" | |
exit 1 | |
fi | |
outputFile=$1 | |
repo=$2 | |
rm $outputFile | |
cd $repo | |
git checkout master |
{ | |
"handshaking": { | |
"toServer": { | |
"handshake": { | |
"id": "0x00", | |
"fields": [ | |
{ | |
"name": "protocolVersion", | |
"type": "varint" | |
}, |
{ | |
"handshaking": { | |
"toServer": { | |
"ji": { | |
"id": "0x00", | |
"fields": [ | |
"ushort" | |
] | |
} | |
} |
{ | |
"handshaking": { | |
"toClient": {}, | |
"toServer": { | |
"set_protocol": { | |
"id": "0x00", | |
"fields": [ | |
{ | |
"name": "protocolVersion", | |
"type": "varint" |
var proto=require("./../../enums/protocol"); | |
var fs=require("fs"); | |
function transformProtocol(protocol) | |
{ | |
var transformedProtocol = Object | |
.keys(protocol) | |
.reduce(function(transformedProtocol, state) { | |
transformedProtocol[state] = Object | |
.keys(protocol[state]) |
{ | |
"types": { | |
"varint": "native", | |
"string": "native", | |
"ushort": "native", | |
"ubyte": "native", | |
"long": "native", | |
"buffer": "native", | |
"int": "native", | |
"byte": "native", |
var proto=require("./../../enums/protocol"); | |
var fs=require("fs"); | |
function tranformProtocol(protocol) | |
{ | |
return {"types":transformTypesObject(protocol.types),"states":transformStates(protocol.states)}; | |
} | |
function transformStates(states) | |
{ |
var dump=serv.world.dump(); | |
var begin=1; | |
var total=20; | |
var x,z; | |
for(x=-begin;x<begin;x++) | |
for(z=-begin;z<begin;z++) { | |
player._client.write('map_chunk', { | |
x: x, | |
z: z, | |
groundUp: true, |