All Projects → PrismarineJS → Node Minecraft Protocol

PrismarineJS / Node Minecraft Protocol

Licence: bsd-3-clause
Parse and serialize minecraft packets, plus authentication and encryption.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Minecraft Protocol

Quarry
Python library that implements the Minecraft network protocol and data types
Stars: ✭ 182 (-73.89%)
Mutual labels:  minecraft, proxy, server, protocol, client
Gophertunnel
Toolbox for Minecraft software written in Go
Stars: ✭ 156 (-77.62%)
Mutual labels:  minecraft, proxy, server, protocol, client
Simplenet
An easy-to-use, event-driven, asynchronous network application framework compiled with Java 11.
Stars: ✭ 164 (-76.47%)
Mutual labels:  server, network, packets, client
Ether.network
https://github.com/Eastrall/Sylver
Stars: ✭ 147 (-78.91%)
Mutual labels:  server, network, client
Clientserverproject
一个C-S模版,该模版由三部分的程序组成,一个服务端运行的程序,一个客户端运行的程序,还有一个公共的组件,实现了基础的账户管理功能,版本控制,软件升级,公告管理,消息群发,共享文件上传下载,批量文件传送功能。具体的操作方法见演示就行。本项目的一个目标是:提供一个基础的中小型系统的C-S框架,客户端有三种模式,无缝集成访问,winform版本,wpf版本,asp.net mvc版本,方便企业进行中小型系统的二次开发和个人学习。同时网络组件方便的支持读写三菱和西门子PLC的数据,详细见Readme
Stars: ✭ 873 (+25.25%)
Mutual labels:  server, network, client
Jstp
Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
Stars: ✭ 132 (-81.06%)
Mutual labels:  server, protocol, client
Go Raknet
An idiomatic Go library implementing a basic version of the RakNet protocol.
Stars: ✭ 40 (-94.26%)
Mutual labels:  server, network, client
Cocsharp
Clash of Clans library, proxy and server written in .NET [Unmaintained]
Stars: ✭ 94 (-86.51%)
Mutual labels:  proxy, server, client
Graphql Ws
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.
Stars: ✭ 398 (-42.9%)
Mutual labels:  server, protocol, client
Gate
A high performant & paralleled Minecraft proxy server with scalability, flexibility & excellent server version support - ready for the cloud!
Stars: ✭ 102 (-85.37%)
Mutual labels:  minecraft, proxy, network
Geyser
A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
Stars: ✭ 2,851 (+309.04%)
Mutual labels:  minecraft, proxy, protocol
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-69.01%)
Mutual labels:  network, protocol, packets
Zserver4d
ZServer4D 是一套从商业项目剥离而出的云服务器中间件,可以承载百万级的分布式负载服务,并且支持IoT及内网穿透
Stars: ✭ 199 (-71.45%)
Mutual labels:  server, network, client
Potatso
Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework. ***This project is unmaintained, try taking a look at this fork https://github.com/shadowcoel/shadowcoel instead.
Stars: ✭ 1,925 (+176.18%)
Mutual labels:  proxy, network, client
Flying Squid
Create Minecraft servers with a powerful, stable, and high level JavaScript API.
Stars: ✭ 311 (-55.38%)
Mutual labels:  minecraft, server, protocol
Polymorph
Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
Stars: ✭ 364 (-47.78%)
Mutual labels:  network, protocol, packets
Yatopia
The Most Powerful and Feature Rich Minecraft Server Software!
Stars: ✭ 408 (-41.46%)
Mutual labels:  minecraft, server
Irc
the irc crate – usable, async IRC for Rust
Stars: ✭ 409 (-41.32%)
Mutual labels:  protocol, client
Happypandax
A cross-platform server and client application for managing and reading manga and doujinshi
Stars: ✭ 432 (-38.02%)
Mutual labels:  server, client
Node Bluetooth Serial Port
Serial I/O over bluetooth for NodeJS
Stars: ✭ 444 (-36.3%)
Mutual labels:  server, client

minecraft protocol

NPM version Build Status Discord Gitter Irc

Try it on gitpod

Parse and serialize minecraft packets, plus authentication and encryption.

Features

  • Supports Minecraft PC version 1.7.10, 1.8.8, 1.9 (15w40b, 1.9, 1.9.1-pre2, 1.9.2, 1.9.4), 1.10 (16w20a, 1.10-pre1, 1.10, 1.10.1, 1.10.2), 1.11 (16w35a, 1.11, 1.11.2), 1.12 (17w15a, 17w18b, 1.12-pre4, 1.12, 1.12.1, 1.12.2), and 1.13 (17w50a, 1.13, 1.13.1, 1.13.2-pre1, 1.13.2-pre2, 1.13.2), 1.14 (1.14, 1.14.1, 1.14.3, 1.14.4) , 1.15 (1.15, 1.15.1, 1.15.2) and 1.16 (20w13b, 20w14a, 1.16-rc1, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4)
  • Parses all packets and emits events with packet fields as JavaScript objects.
  • Send a packet by supplying fields as a JavaScript object.
  • Client
    • Authenticating and logging in
    • Encryption
    • Compression
    • Both online and offline mode
    • Respond to keep-alive packets.
    • Ping a server for status
  • Server
    • Online/Offline mode
    • Encryption
    • Compression
    • Handshake
    • Keep-alive checking
    • Ping status
  • Robust test coverage.
  • Optimized for rapidly staying up to date with Minecraft protocol updates.

Want to contribute on something important for PrismarineJS ? go to https://github.com/PrismarineJS/mineflayer/wiki/Big-Prismarine-projects

Third Party Plugins

node-minecraft-protocol is pluggable.

Projects Using node-minecraft-protocol

  • mineflayer - create minecraft bots with a stable, high level API.
  • mcserve - runs and monitors your minecraft server, provides real-time web interface, allow your users to create bots.
  • flying-squid create minecraft servers with a high level API, also a minecraft server by itself.
  • pakkit To monitor your packets
  • minecraft-packet-debugger to easily debug your minecraft packets

Usage

Echo client example

var mc = require('minecraft-protocol');
var client = mc.createClient({
  host: "localhost",   // optional
  port: 25565,         // optional
  username: "[email protected]",
  password: "12345678",
  auth: 'mojang' // optional; by default uses mojang, if using a microsoft account, set to 'microsoft'
});
client.on('chat', function(packet) {
  // Listen for chat messages and echo them back.
  var jsonMsg = JSON.parse(packet.message);
  if(jsonMsg.translate == 'chat.type.announcement' || jsonMsg.translate == 'chat.type.text') {
    var username = jsonMsg.with[0].text;
    var msg = jsonMsg.with[1];
    if(username === client.username) return;
    client.write('chat', {message: msg.text});
  }
});

If the server is in offline mode, you may leave out the password option.

Hello World server example

var mc = require('minecraft-protocol');
var server = mc.createServer({
  'online-mode': true,   // optional
  encryption: true,      // optional
  host: '0.0.0.0',       // optional
  port: 25565,           // optional
  version: '1.16.3'
});
const mcData = require('minecraft-data')(server.version)

server.on('login', function(client) {
  
  let loginPacket = mcData.loginPacket

  client.write('login', {
    entityId: client.id,
    isHardcore: false,
    gameMode: 0,
    previousGameMode: 255,
    worldNames: loginPacket.worldNames,
    dimensionCodec: loginPacket.dimensionCodec,
    dimension: loginPacket.dimension,
    worldName: 'minecraft:overworld',
    hashedSeed: [0, 0],
    maxPlayers: server.maxPlayers,
    viewDistance: 10,
    reducedDebugInfo: false,
    enableRespawnScreen: true,
    isDebug: false,
    isFlat: false
  });
  client.write('position', {
    x: 0,
    y: 1.62,
    z: 0,
    yaw: 0,
    pitch: 0,
    flags: 0x00
  });
  var msg = {
    translate: 'chat.type.announcement',
    "with": [
      'Server',
      'Hello, world!'
    ]
  };
  client.write("chat", { message: JSON.stringify(msg), position: 0, sender: '0' });
});

Installation

npm install minecraft-protocol

Documentation

See doc See faq

Testing

  • Ensure your system has the java executable in PATH.
  • MC_SERVER_JAR_DIR=some/path/to/store/minecraft/server/ [email protected] MC_PASSWORD=password npm test

Debugging

You can enable some protocol debugging output using DEBUG environment variable:

DEBUG="minecraft-protocol" node [...]

On windows :

set DEBUG=minecraft-protocol
node your_script.js

Contribute

Please read https://github.com/PrismarineJS/prismarine-contribute

History

See history

Related

  • node-rcon can be used to access the rcon server in the minecraft server
  • map-colors can be used to convert any image into a buffer of minecraft compatible colors
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].