specprotocol
v1.4.5
Published
A Minecraft bot framework built from scratch in TypeScript with dynamic packet mapping for Java Edition 1.8-1.21.x
Downloads
832
Maintainers
Readme
SpecProtocol
SpecProtocol is a TypeScript Minecraft bot framework built from scratch.
It supports Java Edition protocol range 1.8 to 1.21.x using dynamic packet maps from minecraft-data.
Install
npm install specprotocolQuick Start
import { createBot } from 'specprotocol';
const bot = await createBot({
host: 'localhost',
port: 25565,
username: 'MyBot',
auth: 'offline',
version: '1.21.x'
});
bot.on('spawn', () => {
bot.chat('Hello from SpecProtocol');
});
bot.on('chat', (message) => {
console.log(message);
});Version Selection
version can be:
- Protocol number (example:
47,769) - Exact Minecraft version string (example:
'1.8.9','1.21.4') - Prefix or wildcard (example:
'1.8','1.21.x')
If omitted, SpecProtocol uses the latest release protocol available in the installed minecraft-data package.
Main Capabilities
- Login and play state handling
- Compression and encryption
- Typed bot events
- Entity and world tracking
- Plugin system
- Raw packet access
Development
npm run lint
npm run buildRequirements
- Node.js
>=18
License
MIT
