npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

baltica

v0.1.17

Published

Library for Minecraft Bedrock Edition community developers.

Readme

Baltica 🌊


🚀 What's New in v0.1.0

Complete rewrite, from the ground up! Here's what makes it awesome:

  • Lightning Fast Performance - We obsessed over every millisecond to make this as snappy as possible.

  • Full TypeScript Support - Proper types everywhere, so your IDE will actually help you instead of fighting you.

  • Zero Maintenance Headaches - Built on top of solid libraries like @serenityjs/protocol and @serenityjs/binarystream so we don't have to reinvent the wheel.

  • Three-in-one - Three tools in one package: Server, Client, and Bridge (MITM Proxy)


📋 Version Support

0.1.0 → Minecraft Bedrock 1.21.93

0.1.8 → Minecraft Bedrock 1.21.100 & 1.21.101

0.1.13 → Minecraft Bedrock 1.21.113

Note: We dropped multi-version support because honestly, it was more trouble than it was worth. One version, done right.


🛠️ Getting Started

Client Usage

Perfect for creating bots, automation tools, or custom clients:

const client = new Client({
  offline: false, // Set to true if you don't want Xbox Live authentication
  username: 'MyAwesomeBot',
  address: "127.0.0.1",
  port: 19132,
});

// Connect and get server info
await client.connect();

// Listen for chat messages
client.on("TextPacket", (packet) => {
  console.log(`Got message: ${packet.message}`);
});

// Send a friendly greeting when connected
client.on("connect", () => {
  const packet = new TextPacket();
   packet.message = 'Hey everyone! 👋';
   packet.needsTranslation = false;
   packet.parameters = [];
   packet.platformChatId = '';
   packet.source = client.username;
   packet.type = TextPacketType.Chat;
   packet.xuid = client.profile.xuid.toString();
   packet.filtered = '';
  client.send(packet.serialize());
});

Server Usage

Want to create your own Minecraft server? We got you:

const server = new Server({
  address: "127.0.0.1",
  port: 19132
});

server.start();

server.on("playerConnect", (player) => {
  console.log(`${player.username} is connecting...`);

  player.on("login", () => {
    console.log(`Welcome ${player.username}! 🎉`);
  });
});

Bridge/Proxy Usage

This is where things get spicy - intercept and modify packets on the fly:

import { Bridge } from "baltica";

const bridge = new Bridge({
  destination: {
    address: "127.0.0.1", // Your actual server
    port: 19132,
  },
  address: "0.0.0.0", // Proxy address
  port: 19133,        // Proxy port
});

bridge.start();

// Intercept all connections
bridge.on("connect", (player) => {
  console.log(`Player connected through proxy: ${player.client.username}`);

  // Listen to messages going TO the client
  player.on("clientBound-TextPacket", (signal) => {
    console.log(`Server said: ${signal.packet.message}`);
  });

  // Modify messages coming FROM the client
  player.on("serverBound-TextPacket", (signal) => {
    // Add a fun prefix to all messages
    signal.packet.message = `[${player.client.username}]: ${signal.packet.message}`;
    signal.modified = true; // Don't forget this!
  });
});

Using Bridge to get skinData

This example shows how to obtain skinData via bridge and use it with a client.

const bridge = new Bridge({
	destination: {
		address: "127.0.0.1",
	   port: 19132,
	},
});
bridge.start();

bridge.on("connect", (player) => {
   setTimeout(() => {
      console.log(player.player.loginPayload as SkinData);
      writeFileSync(`${player.client.username}-skin.json`, JSON.stringify({
         AnimatedImageData: player.player.loginPayload.AnimatedImageData,
         ArmSize: player.player.loginPayload.ArmSize,
         CapeData: player.player.loginPayload.CapeData,
         CapeId: player.player.loginPayload.CapeId,
         CapeImageHeight: player.player.loginPayload.CapeImageHeight,
         CapeImageWidth: player.player.loginPayload.CapeImageWidth,
         CapeOnClassicSkin: player.player.loginPayload.CapeOnClassicSkin,
         PersonaPieces: player.player.loginPayload.PersonaPieces,
         PersonaSkin: player.player.loginPayload.PersonaSkin,
         SkinAnimationData: player.player.loginPayload.SkinAnimationData,
         SkinData: player.player.loginPayload.SkinData,
         SkinGeometryData: player.player.loginPayload.SkinGeometryData,
         SkinGeometryDataEngineVersion: player.player.loginPayload.SkinGeometryDataEngineVersion,
         SkinId: player.player.loginPayload.SkinId,
         SkinImageHeight: player.player.loginPayload.SkinImageHeight,
         SkinImageWidth: player.player.loginPayload.SkinImageWidth,
         PieceTintColors: player.player.loginPayload.PieceTintColors,
         PremiumSkin: player.player.loginPayload.PremiumSkin,
         SkinColor: player.player.loginPayload.SkinColor,
         SkinResourcePatch: player.player.loginPayload.SkinResourcePatch,
         TrustedSkin: player.player.loginPayload.TrustedSkin,
      } as SkinData))
   }, 6000);
})

And this is how you could apply it:

import * as skin from "username-skin.json";

const client = new Client({
   skinData: skin,
});

🤝 Contributing

Found a bug? Have a cool idea? We'd love to hear from you! Open an issue or submit a PR.


📄 License

This project is licensed under the MIT License - because sharing is caring.