This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
function parsePackets(path) | |
{ | |
var files = fs.readdirSync(path); | |
return files | |
.filter(function(name) {return !(name == "DataPacket.php" || name == "Info.php");}) | |
.map(function(name){ | |
var file = (fs.readFileSync(path + name, 'utf8')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"packetName": "add_entity_packet", | |
"clientBound": true, | |
"serverBound": false, | |
"fields": [ | |
{ | |
"name": "eid", | |
"type": "long" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Chunk = require('prismarine-chunk')("1.8"); | |
var Vec3 = require("vec3"); | |
var chunk=new Chunk(); | |
for (var x = 0; x < 16;x++) { | |
for (var z = 0; z < 16; z++) { | |
chunk.setBlockType(new Vec3(x, 50, z), 2); | |
for (var y = 0; y < 256; y++) { | |
chunk.setSkyLight(new Vec3(x, y, z), 15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mineflayer = require('mineflayer'); | |
if(process.argv.length < 3 || process.argv.length > 5) { | |
console.log("Usage : node multiple.js <host> <port>"); | |
process.exit(1); | |
} | |
for(var i=0;i<10;i++) | |
createBot("bot"+i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ygg = require("yggdrasil")({host: 'https://authserver.mojang.com'}); | |
ygg.auth({user:"Corgano",pass:"super password"},function(err,data) { if(err) console.log("fail"); else | |
console.log("success"); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transformUuid(s) | |
{ | |
return s.split("-").map(function(item) { return parseInt(item, 16); }); | |
} | |
var mc=require("minecraft-protocol"); | |
var params={ | |
"action": 0, | |
"data": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var options = { | |
hostname: 'www.whatismyipv6.com', | |
localAddress: process.argv[2], | |
family:6 | |
}; | |
var req = http.request(options, function(res) { | |
res.on('data', function (chunk) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "48", | |
"displayName": "Mob", | |
"width": null, | |
"height": null, | |
"type": "mob" | |
}, | |
{ | |
"id": "49", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ITERATIONS = 10000; | |
var ProtoDef=require("protodef").ProtoDef; | |
var Parser=require("protodef").Parser; | |
var testDataWrite = [ | |
{ | |
name: "entity_look", | |
params: { | |
"entityId": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function commandBlock(x,y,z,command,track_output) | |
{ | |
var ProtoDef = require("protodef").ProtoDef; | |
var proto = new ProtoDef(); | |
proto.addType("string",["pstring",{ | |
countType:"varint" | |
}]); |