I hereby claim:
- I am rom1504 on github.
- I am rom1504 (https://keybase.io/rom1504) on keybase.
- I have a public key ASB1Z9sbI8JRLzgvFg_Unf0luj8-SK7QKOGrCcpLDyZF-Qo
To claim this, I am signing this object:
| const p=require('./protocol.json'); | |
| const json_string_of_jarray=(a,lb,t) => '['+(lb ? "\n" : "")+(a.map((v,i) => { | |
| const withoutBreak=(lb ? t+" " : "")+json_string_of_jvalue(v,false); | |
| return withoutBreak.length+(i!=(a.length-1) ? 1 : 0)>80 && lb ? (lb ? t+" " : "")+json_string_of_jvalue(v,lb,t+" ") : withoutBreak; | |
| })).join(lb ? ",\n" : ", ")+(lb ? "\n"+t : "")+']'; | |
| const json_string_of_jobject=(o,lb,t) => '{'+(lb ? "\n" : "")+Object.keys(o).map((k,i) => { | |
| const withoutBreak=(lb ? t+' ' : '')+'"'+k+'": '+json_string_of_jvalue(o[k],false); |
| // model : https://github.com/rom1504/JsonConv/blob/master/source/json_to_json.ml | |
| const p=require('./protocol.json'); | |
| const json_string_of_jarray=a => `[${(a.map(json_string_of_jvalue)).join(",")}]`; | |
| const json_string_of_jobject=o => `{${Object.keys(o).map(k => '"'+k+'":'+json_string_of_jvalue(o[k])).join(",")}}`; | |
| const json_string_of_jvalue=v => { | |
| if(v===null) | |
| return "NULL"; | |
| if(v.constructor===Array) |
| const equal = require('deep-equal'); | |
| if(process.argv.length != 4) { | |
| console.log("Usage : node protocol-diff.js <protocol1.json> <protocol2.json>"); | |
| process.exit(1); | |
| } | |
| const p1File=process.argv[2]; | |
| const p2File=process.argv[3]; |
| { | |
| "play": { | |
| "toClient": { | |
| "oldTypes": { | |
| "packet_login": [ | |
| "container", | |
| [ | |
| { | |
| "name": "entityId", | |
| "type": "i32" |
| { | |
| "play": { | |
| "toServer": { | |
| "oldTypes": { | |
| "packet_resource_pack_receive": [ | |
| "container", | |
| [ | |
| { | |
| "name": "hash", | |
| "type": "string" |
| { | |
| "type": "compound", | |
| "name": "", | |
| "value": { | |
| "DayCycleStopTime": { | |
| "type": "int", | |
| "value": -1 | |
| }, | |
| "GameType": { | |
| "type": "int", |
| var numeric=require("./test/numeric"); | |
| var le=numeric.map(n => ({ | |
| "type":"l"+n.type, | |
| "values":n.values.map(v => ({ | |
| "description":v.description, | |
| "buffer":v.buffer.slice().reverse(), | |
| "value":v.value | |
| })) | |
| })); |
| { | |
| "name": "data_packet_4", | |
| "params": { | |
| "seqNumber": 0, | |
| "encapsulatedPackets": [ | |
| { | |
| "reliability": 2, | |
| "hasSplit": 0, | |
| "length": 33, | |
| "messageIndex": 0, |
| /<([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1>/ | |
| /(<link[^>]*(?:\s(?:type=[\"']?(application\/rss\+xml|application\/atom\+xml|application\/rss|application\/atom|application\/rdf\+xml|application\/rdf|text\/rss\+xml|text\/atom\+xml|text\/rss|text\/atom|text\/rdf\+xml|text\/rdf|text\/xml|application\/xml)[\"']?|rel=[\"']?(?:alternate)[\"']?))[^>]*>)/ |
I hereby claim:
To claim this, I am signing this object: