Metadata-Version: 2.4
Name: pybedrock-net
Version: 0.0.1
Summary: A Python-native RakNet foundation for Minecraft Bedrock protocol experiments.
Author: ZENKAI
Project-URL: Homepage, https://pypi.org/project/pybedrock-net/
Project-URL: YouTube, https://www.youtube.com/@szewq
Keywords: minecraft,bedrock,raknet,udp,protocol,bot
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: build>=1.4.4
Requires-Dist: pytest>=8.4.2
Requires-Dist: twine>=6.2.0

# pybedrock-net

Python-native RakNet foundations for Minecraft Bedrock protocol experiments.

Developed by ZENKAI, with Sader (سادر) leading the development and protocol
implementation work.

## Overview

`pybedrock-net` is an early development project focused on understanding and
implementing Minecraft Bedrock networking directly in Python. Bedrock uses
RakNet as an important networking foundation. The long-term goal is a reusable
Python foundation for programmable Bedrock clients, bots, protocol tools,
testing tools, experiments, and automation systems.

This project targets the network protocol rather than requiring a complete
Minecraft game client. It is not a Minecraft server and is not a replacement
for Minecraft.

## Current implementation

Version 0.0.1 contains a real UDP implementation of the RakNet offline
handshake:

```text
0x05 OpenConnectionRequest1
          ↓
0x06 OpenConnectionReply1
          ↓
0x07 OpenConnectionRequest2
          ↓
0x08 OpenConnectionReply2
```

`RakNetSession` creates a UDP socket, sends Request1, parses Reply1, sends
Request2, and parses Reply2. The command-line probe performs this exchange
against a reachable Bedrock UDP endpoint.

Successful Reply2 means only that the RakNet offline handshake completed. It
does not mean the client logged into Minecraft or entered the world.

## Architecture

```text
Python application / Bot
          ↓
      UDP transport
          ↓
        RakNet
          ↓
Minecraft Bedrock protocol
          ↓
Minecraft Bedrock server
```

The transport layer owns UDP communication. RakNet provides the connection and
reliability foundation. The Bedrock layer will eventually provide login, world,
player, chat, and command protocol support.

## Live connection probe

Run this against a real Bedrock UDP endpoint:

```bash
pybedrock-net example.org --port 19132
```

The host and port are supplied by the user and are never embedded in the
package. No credentials or server infrastructure are included.

## Usage

The current session API is experimental:

```python
import asyncio
from pybedrock_net import RakNetSession


async def main() -> None:
    session = RakNetSession("example.org", port=19132)
    try:
        reply = await session.connect()
        print(reply.server_guid, reply.mtu)
    finally:
        session.close()


asyncio.run(main())
```

This connects to RakNet only. It does not log in, move a player, follow a
player, send chat, or execute commands yet.

## Current limitations

- Connected RakNet framing is not implemented.
- Complete reliability, ACK, NAK, ordering, and channel handling are not
  implemented.
- RakNet connection request and accepted-connection stages are not implemented.
- Bedrock login, encryption, network settings, start game, and play state are
  not implemented.
- Player position tracking and movement packets are not implemented.
- Following a player, chat messages, and command execution are not implemented.
- No stable high-level bot API is available.

These limitations are explicit because sending guessed Bedrock packets can
disconnect a server or corrupt a session.

## Roadmap

1. **RakNet offline handshake** — implemented and locally tested; real-server
   verification depends on a reachable endpoint.
2. **Connected RakNet framing** — in development.
3. **Reliability, ACK/NAK, ordering, and session lifecycle** — planned.
4. **Bedrock login and encryption** — planned.
5. **Bedrock play protocol and player tracking** — planned.
6. **Movement, follow-player behavior, chat, and permitted commands** — planned.
7. **High-level Bedrock bot API** — long-term goal.

## Installation

```bash
pip install pybedrock-net
```

Version 0.0.1 is an early foundation/development release. APIs may change,
protocol implementation is incomplete, and the package is not production-ready.

## Development

```bash
python -m pytest
python -m build
python -m twine check dist/*
```

## Developer & Community

- **Developer:** ZENKAI
- **Development:** Sader (سادر)
- **Telegram:** `s_xwn`
- **TikTok:** `s_xwn`
- **YouTube:** https://www.youtube.com/@szewq

An official support/community link may be added in a future release.

## Future Support

The intended future bot layer may allow Python programs to connect to Bedrock
servers where supported, authenticate, receive player events, follow a target
player, move, send chat, issue permitted commands, and automate protocol-level
tasks. These are future capabilities, not features available in 0.0.1.

## License

No license file was present when this distribution was prepared. A license
should be selected before the project is treated as a fully licensed
open-source distribution.
