Skip to content

Instantly share code, notes, and snippets.

View rom1504's full-sized avatar

Romain Beaumont rom1504

View GitHub Profile
@rom1504
rom1504 / recipes.json
Created February 16, 2013 14:31
minecraft recipes
{
"Oak Wood Planks": [
{
"output": 4,
"recipe": [
null,
null,
null,
null,
"Oak Wood",
@rom1504
rom1504 / gitStats.sh
Last active August 29, 2015 14:21
git stats
if [[ $# -ne 2 ]]
then
echo "usage : $0 <outputFile> <repo>"
exit 1
fi
outputFile=$1
repo=$2
rm $outputFile
cd $repo
git checkout master
@rom1504
rom1504 / protocol.json
Last active August 29, 2015 14:26
Protocol automatically extracted from wiki.vg/Protocol
{
"handshaking": {
"toServer": {
"handshake": {
"id": "0x00",
"fields": [
{
"name": "protocolVersion",
"type": "varint"
},
@rom1504
rom1504 / decompiledProtocol.json
Last active October 7, 2015 21:29
protocol extracted automatically from decompiled minecraft source
{
"handshaking": {
"toServer": {
"ji": {
"id": "0x00",
"fields": [
"ushort"
]
}
}
@rom1504
rom1504 / mcprotos_list.md
Last active May 31, 2017 08:44
List of files representing the minecraft protocol
@rom1504
rom1504 / protocol.json
Created August 7, 2015 12:17
comparison of packets names with wiki.vg
{
"handshaking": {
"toClient": {},
"toServer": {
"set_protocol": {
"id": "0x00",
"fields": [
{
"name": "protocolVersion",
"type": "varint"
@rom1504
rom1504 / transform.js
Created August 24, 2015 16:52
Transform the types in minecraft-data protocol.json
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])
@rom1504
rom1504 / unnamed_protocol.json
Last active September 3, 2015 21:26
unnamed protocol
{
"types": {
"varint": "native",
"string": "native",
"ushort": "native",
"ubyte": "native",
"long": "native",
"buffer": "native",
"int": "native",
"byte": "native",
@rom1504
rom1504 / transform.js
Last active September 3, 2015 21:25
remove names from protocol.json
var proto=require("./../../enums/protocol");
var fs=require("fs");
function tranformProtocol(protocol)
{
return {"types":transformTypesObject(protocol.types),"states":transformStates(protocol.states)};
}
function transformStates(states)
{
@rom1504
rom1504 / login.js
Created September 5, 2015 15:14
Sending the same chunk for 20*20 chunks
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,