node-minecraft-protocol/src/index.js

32 lines
1.1 KiB
JavaScript
Raw Normal View History

var Client = require('./client');
var Server = require('./server');
var Yggdrasil = require('./yggdrasil.js');
var serializer = require("./transforms/serializer");
var utils = require("./utils");
var version = require("./version");
2015-08-27 07:36:07 -04:00
var packets = require('minecraft-data')(version.majorVersion).protocol.states;
var readPackets = require("./packets").readPackets;
var packetIndexes = readPackets(packets, serializer.states);
var createClient = require("./createClient");
var createServer = require("./createServer");
module.exports = {
createClient: createClient,
createServer: createServer,
Client: Client,
Server: Server,
states: serializer.states,
createPacketBuffer: serializer.createPacketBuffer,
parsePacketData: serializer.parsePacketData,
packetFields: packetIndexes.packetFields,
packetNames: packetIndexes.packetNames,
packetIds: packetIndexes.packetIds,
packetStates: packetIndexes.packetStates,
types: serializer.types,
get: serializer.get,
2015-03-07 00:00:32 -05:00
ping: require('./ping'),
yggdrasil: Yggdrasil,
version: version.version,
minecraftVersion: version.minecraftVersion
};