atomic-protocol
v1.3.32
Published
Atomic Protocol is a modern, efficient, and fully TypeScript-rewritten version of PrismarineJS/bedrock-protocol. It's built with performance and maintainability in mind.
Downloads
4,810
Maintainers
Readme
Atomic Protocol
Atomic Protocol is a modern, efficient, and fully TypeScript-rewritten version of PrismarineJS/bedrock-protocol. It's built with performance and maintainability in mind.
Key points:
- Minecraft Version:
1.21.130 - Written in TypeScript
- Strongly-typed packet definitions
- Clean API for client creation
- No proxy or server implementation (for those, use the original PrismarineJS/bedrock-protocol)
Installation
yarn add atomic-protocol
# or
npm install atomic-protocolUsage
import { Client } from "atomic-protocol";
const client = new Client({
host: "example.com",
port: 19132,
});
client.on("start_game", () => {
console.log("Game started!");
});
client.on("add_player", packet => {
console.log("New player joined:", packet.username);
});Packet Type Definitions
All packet structures are auto-generated from src/config/protocol.json into TypeScript definitions under src/packets/.
This means you get full IntelliSense and type-safety when working with packets:
client.on("text", (packet) => {
// `packet` is strongly typed as `TextPacket`
console.log(`[${packet.source}] ${packet.message}`);
});Development (Yarn + Turbo)
- Install dependencies:
yarn install - Type-check and build:
yarn turbo run build - Bundle (depends on build):
yarn turbo run bundle - Type-check only:
yarn turbo run lint
Roadmap
- [x] Nethernet Support
- Fully Supported
- [x] API Documentation
- FAQ Soon
- [x] Move the entire Codec in it's own REPO
- https://github.com/AtomicTS/Atomic-Codec
- [ ] Atomic-Auth & Atomic-Realms
- [ ] Future Enhancements
- Consider adding proxy support (client + server pass-through).
- Explore server implementation (stretch goal).
Contributing
Contributions are welcome! Feel free to open issues and pull requests to improve Atomic Protocol.
Authors
License
This project is licensed under the MIT License. See the LICENSE file for details.
