use mcdata
This commit is contained in:
parent
8109dbcdd8
commit
de05863815
5 changed files with 4 additions and 1939 deletions
1936
data/protocol.json
1936
data/protocol.json
File diff suppressed because it is too large
Load diff
|
|
@ -17,6 +17,7 @@
|
|||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minecraft-data": "^2.4.0",
|
||||
"prismarine-nbt": "^1.0.0",
|
||||
"protodef": "^1.2.0",
|
||||
"raknet": "^1.7.3",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function createClient(options) {
|
|||
|
||||
assert.ok(options.username, 'username is required');
|
||||
|
||||
options.customPackets=require('../data/protocol');
|
||||
options.customPackets=require('minecraft-data')('pe_0.14').protocol;
|
||||
options.customTypes=require('./datatypes/minecraft');
|
||||
|
||||
var client=raknet.createClient(options);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ function createServer(options) {
|
|||
19132;
|
||||
var host = options.host || '0.0.0.0';
|
||||
|
||||
options.customPackets=require("../data/protocol");
|
||||
options.customPackets=require('minecraft-data')('pe_0.14').protocol;
|
||||
options.customTypes=require("./datatypes/minecraft");
|
||||
var server = raknet.createServer(options);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ var ProtoDef = require('protodef').ProtoDef;
|
|||
var Serializer = require('protodef').Serializer;
|
||||
var Parser = require('protodef').Parser;
|
||||
|
||||
var protocol = require('../../data/protocol.json').types;
|
||||
var protocol = require('minecraft-data')('pe_0.14').protocol;
|
||||
|
||||
function createProtocol() {
|
||||
var proto = new ProtoDef();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue