mcpy-core 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. mcpy_core-1.0.0.dist-info/METADATA +253 -0
  2. mcpy_core-1.0.0.dist-info/RECORD +44 -0
  3. mcpy_core-1.0.0.dist-info/WHEEL +5 -0
  4. mcpy_core-1.0.0.dist-info/licenses/LICENSE +21 -0
  5. mcpy_core-1.0.0.dist-info/top_level.txt +1 -0
  6. mcpycore/__init__.py +127 -0
  7. mcpycore/client/__init__.py +1 -0
  8. mcpycore/client/client.py +615 -0
  9. mcpycore/client/connection.py +262 -0
  10. mcpycore/client/reconnect.py +118 -0
  11. mcpycore/compression/__init__.py +1 -0
  12. mcpycore/compression/compression.py +120 -0
  13. mcpycore/crypto/__init__.py +1 -0
  14. mcpycore/crypto/encryption.py +108 -0
  15. mcpycore/debug/__init__.py +1 -0
  16. mcpycore/debug/inspector.py +142 -0
  17. mcpycore/events/__init__.py +1 -0
  18. mcpycore/events/emitter.py +265 -0
  19. mcpycore/extensions/__init__.py +1 -0
  20. mcpycore/extensions/loader.py +159 -0
  21. mcpycore/network/__init__.py +1 -0
  22. mcpycore/network/stream.py +232 -0
  23. mcpycore/protocol/__init__.py +1 -0
  24. mcpycore/protocol/handlers/__init__.py +1 -0
  25. mcpycore/protocol/handlers/dispatcher.py +151 -0
  26. mcpycore/protocol/packets/__init__.py +1 -0
  27. mcpycore/protocol/packets/base.py +173 -0
  28. mcpycore/protocol/registry/__init__.py +1 -0
  29. mcpycore/protocol/registry/registry.py +132 -0
  30. mcpycore/protocol/serializers/__init__.py +1 -0
  31. mcpycore/protocol/serializers/buffer.py +345 -0
  32. mcpycore/protocol/serializers/nbt.py +252 -0
  33. mcpycore/protocol/states/__init__.py +1 -0
  34. mcpycore/protocol/states/machine.py +107 -0
  35. mcpycore/protocol/versions/__init__.py +1 -0
  36. mcpycore/protocol/versions/adapters/__init__.py +31 -0
  37. mcpycore/protocol/versions/base.py +125 -0
  38. mcpycore/protocol/versions/v1_20/__init__.py +4 -0
  39. mcpycore/protocol/versions/v1_20/packets.py +145 -0
  40. mcpycore/protocol/versions/v1_21/__init__.py +4 -0
  41. mcpycore/protocol/versions/v1_21/packets.py +256 -0
  42. mcpycore/utils/__init__.py +1 -0
  43. mcpycore/utils/logging.py +88 -0
  44. mcpycore/utils/metrics.py +128 -0
@@ -0,0 +1,253 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcpy-core
3
+ Version: 1.0.0
4
+ Summary: Professional async-first Minecraft Java Edition protocol framework (1.20.2 – 1.21.11)
5
+ Author: McPy-Core Contributors
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/your-org/mcpy-core
8
+ Project-URL: Documentation, https://github.com/your-org/mcpy-core/blob/main/docs/quickstart.md
9
+ Project-URL: Issues, https://github.com/your-org/mcpy-core/issues
10
+ Project-URL: Changelog, https://github.com/your-org/mcpy-core/blob/main/CHANGELOG.md
11
+ Keywords: minecraft,protocol,client,bot,async,asyncio,java-edition,mc,framework
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Framework :: AsyncIO
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Games/Entertainment
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: cryptography>=41.0.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8.0; extra == "dev"
28
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
29
+ Requires-Dist: black>=24.0; extra == "dev"
30
+ Requires-Dist: mypy>=1.8; extra == "dev"
31
+ Requires-Dist: ruff>=0.3; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # McPy-Core
35
+
36
+ **Professional async-first Minecraft Java Edition protocol library.**
37
+
38
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org/)
39
+ [![Protocol](https://img.shields.io/badge/MC%20protocol-764–775-green.svg)](https://wiki.vg/Protocol)
40
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
41
+
42
+ McPy-Core is a clean, scalable, production-quality Minecraft protocol framework for Python 3.12+. Build bots, automation tools, custom clients, protocol research tools, and servers with a modern async API.
43
+
44
+ ```python
45
+ import asyncio
46
+ from mcpycore import MinecraftClient
47
+
48
+ async def main():
49
+ client = MinecraftClient("play.example.com", username="BotName")
50
+
51
+ @client.event
52
+ async def on_chat(message, sender):
53
+ print(f"[{sender}] {message}")
54
+ if message == "ping":
55
+ await client.send_chat("pong!")
56
+
57
+ await client.start()
58
+
59
+ asyncio.run(main())
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Features
65
+
66
+ | Feature | Details |
67
+ |---|---|
68
+ | **Async-first** | Built on `asyncio` — no threads, no blocking calls |
69
+ | **Event-driven API** | `@client.event` decorators or `client.on(event, handler)` |
70
+ | **Multi-version** | Minecraft 1.20.2 → 1.21.11 (protocols 764–775 + snapshots) |
71
+ | **Packet system** | Typed packets with `@packet` decorator + auto-registration |
72
+ | **Encryption** | AES-128-CFB8 (online & offline mode) |
73
+ | **Compression** | zlib with configurable threshold |
74
+ | **Reconnect policies** | Fixed delay, exponential back-off, infinite retry |
75
+ | **Extension system** | Plugin modules with `setup()` / `teardown()` |
76
+ | **Packet inspector** | Real-time `[RECV]`/`[SEND]` logging + hex dump |
77
+ | **Metrics** | Latency tracking, packet counters, uptime |
78
+ | **NBT parser** | All 13 tag types, nested compounds, `nbt_to_dict()` |
79
+ | **Strong typing** | Full type hints throughout |
80
+ | **Test suite** | 200+ tests with zero external dependencies |
81
+
82
+ ---
83
+
84
+ ## Installation
85
+
86
+ ```bash
87
+ pip install mcpy-core
88
+ ```
89
+
90
+ Or from source:
91
+
92
+ ```bash
93
+ git clone https://github.com/your-org/mcpy-core.git
94
+ cd mcpy-core
95
+ pip install -e ".[dev]"
96
+ ```
97
+
98
+ **Requirements:** Python 3.12+, `cryptography`
99
+
100
+ ---
101
+
102
+ ## Quick Examples
103
+
104
+ ### Server status ping (no login required)
105
+
106
+ ```python
107
+ from examples.server_status import ping
108
+ import asyncio
109
+
110
+ data = asyncio.run(ping("play.hypixel.net"))
111
+ print(data["version"]["name"]) # "Paper 1.21.1"
112
+ print(data["players"]["online"]) # 45000
113
+ print(f"{data['latency_ms']}ms")
114
+ ```
115
+
116
+ ### Position + movement
117
+
118
+ ```python
119
+ @client.event
120
+ async def on_spawn(x, y, z):
121
+ print(f"Spawned at ({x:.1f}, {y:.1f}, {z:.1f})")
122
+ await client.move(x + 5, y, z)
123
+ await client.look(yaw=90.0, pitch=-20.0)
124
+ ```
125
+
126
+ ### Auto-reconnect
127
+
128
+ ```python
129
+ from mcpycore.client.reconnect import ExponentialBackoff
130
+
131
+ client = MinecraftClient(
132
+ "play.example.com",
133
+ reconnect_policy=ExponentialBackoff(base_delay=1.0, max_delay=60.0),
134
+ )
135
+ ```
136
+
137
+ ### Custom packets
138
+
139
+ ```python
140
+ from mcpycore import Packet, packet, PacketBuffer, State
141
+ from mcpycore.protocol.registry.registry import Direction
142
+
143
+ @packet(packet_id=0x05, state=State.PLAY, direction=Direction.SERVERBOUND)
144
+ class ChatMessage(Packet):
145
+ message: str = ""
146
+
147
+ def encode(self) -> bytes:
148
+ buf = PacketBuffer()
149
+ buf.write_string(self.message)
150
+ return buf.flush()
151
+ ```
152
+
153
+ ### Extensions / plugins
154
+
155
+ ```python
156
+ # greet_extension.py
157
+ async def setup(client):
158
+ @client.on("spawn")
159
+ async def on_spawn(x, y, z):
160
+ await client.send_chat("Hello from my extension!")
161
+
162
+ async def teardown(client):
163
+ print("Extension unloaded")
164
+ ```
165
+
166
+ ```python
167
+ client.load_extension("greet_extension")
168
+ client.unload_extension("greet_extension")
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Project Structure
174
+
175
+ ```
176
+ mcpycore/
177
+ ├── client/
178
+ │ ├── client.py ← MinecraftClient — high-level async API
179
+ │ ├── connection.py ← TCP handshake → login → play lifecycle
180
+ │ └── reconnect.py ← Reconnect policy hierarchy
181
+ ├── protocol/
182
+ │ ├── packets/
183
+ │ │ └── base.py ← Packet base + @packet decorator
184
+ │ ├── serializers/
185
+ │ │ ├── buffer.py ← PacketBuffer (all primitives)
186
+ │ │ └── nbt.py ← NBT parser
187
+ │ ├── registry/
188
+ │ │ └── registry.py ← PacketRegistry (version-aware)
189
+ │ ├── states/
190
+ │ │ └── machine.py ← Protocol state machine
191
+ │ ├── handlers/
192
+ │ │ └── dispatcher.py ← PacketDispatcher + middleware
193
+ │ └── versions/
194
+ │ ├── base.py ← VersionAdapter + version constants
195
+ │ ├── v1_20/ ← ID tables for protocols 764–766
196
+ │ └── v1_21/ ← ID tables for protocols 767–775
197
+ ├── network/
198
+ │ └── stream.py ← AsyncStream (framing/crypto/compression)
199
+ ├── events/
200
+ │ └── emitter.py ← AsyncEventEmitter + Events constants
201
+ ├── crypto/
202
+ │ └── encryption.py ← EncryptionManager (AES-128-CFB8)
203
+ ├── compression/
204
+ │ └── compression.py ← CompressionManager (zlib)
205
+ ├── debug/
206
+ │ └── inspector.py ← PacketInspector (debug logging)
207
+ ├── extensions/
208
+ │ └── loader.py ← ExtensionLoader (plugin system)
209
+ └── utils/
210
+ ├── logging.py ← Structured colour logging
211
+ └── metrics.py ← MetricsCollector
212
+ tests/ ← pytest suite (200+ tests)
213
+ examples/ ← Runnable example scripts
214
+ docs/ ← quickstart.md, architecture.md
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Supported Versions
220
+
221
+ | Minecraft Version | Protocol |
222
+ |---|---|
223
+ | 1.20.2 | 764 |
224
+ | 1.20.4 | 765 |
225
+ | 1.20.6 | 766 |
226
+ | 1.21 / 1.21.1 | 767 |
227
+ | 1.21.2 / 1.21.3 | 768 |
228
+ | 1.21.4 | 769 |
229
+ | 1.21.5–1.21.11 | 770–775 |
230
+ | Snapshots | Auto-fallback to nearest stable |
231
+
232
+ ---
233
+
234
+ ## Testing
235
+
236
+ ```bash
237
+ pytest tests/ -v
238
+ ```
239
+
240
+ The suite covers: `PacketBuffer`, NBT, events, compression, encryption, state machine, registry, dispatcher, client, and metrics.
241
+
242
+ ---
243
+
244
+ ## Documentation
245
+
246
+ - [`docs/quickstart.md`](docs/quickstart.md) — getting started guide
247
+ - [`docs/architecture.md`](docs/architecture.md) — design overview and layer diagram
248
+
249
+ ---
250
+
251
+ ## License
252
+
253
+ MIT
@@ -0,0 +1,44 @@
1
+ mcpy_core-1.0.0.dist-info/licenses/LICENSE,sha256=4p7bNMCZN8XNXVZDUkvC-D-EID9iF1A3vl_wNExzCeA,1078
2
+ mcpycore/__init__.py,sha256=TTR0cVdGCp77PTdPVgKr032izaVlts9gAFlQcsyKPMU,3704
3
+ mcpycore/client/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
4
+ mcpycore/client/client.py,sha256=tr2_Iq2mztXN_nApcoZ3GMS8hCGMF7-mToGwROU_Kmw,24596
5
+ mcpycore/client/connection.py,sha256=XxJAhd9w3nDSS9SCBD26VBs62dvi76onFu6aBJKNpRE,9960
6
+ mcpycore/client/reconnect.py,sha256=i9KLFXgidkAOy2VA1a-23L0CMnPtFNHuKglsvDP89Es,3394
7
+ mcpycore/compression/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
8
+ mcpycore/compression/compression.py,sha256=75ASfrAUNWc2s7nF_O_hslXbD4RXEEcPpG5gflQghkk,3787
9
+ mcpycore/crypto/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
10
+ mcpycore/crypto/encryption.py,sha256=gAENVFu4OJy5QMPDedb1EDEM6kn8RBbutsIwn5_GZi8,3745
11
+ mcpycore/debug/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
12
+ mcpycore/debug/inspector.py,sha256=guY2DHlb6lb4WPUnsIJWXOT7bZAzImaofT9wht6jWyQ,4245
13
+ mcpycore/events/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
14
+ mcpycore/events/emitter.py,sha256=Rb0WIVRXYsCgw12kWdRne1RyzOJD7CrbtnrMAzsFAWA,8714
15
+ mcpycore/extensions/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
16
+ mcpycore/extensions/loader.py,sha256=k4OkzIn0DTMIr9L0L_C8aL4jYBtDQca2dpKyYoGbdwY,5071
17
+ mcpycore/network/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
18
+ mcpycore/network/stream.py,sha256=PDmAKyhlc2JheRWcuYmIR_n9OsSk8PdxoKpc-USV0oQ,8376
19
+ mcpycore/protocol/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
20
+ mcpycore/protocol/handlers/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
21
+ mcpycore/protocol/handlers/dispatcher.py,sha256=3q-ObXxauloEk0iY9SEhbI6nfPmqSjVK8s4w3q8uB7A,4990
22
+ mcpycore/protocol/packets/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
23
+ mcpycore/protocol/packets/base.py,sha256=83r8O0IkwMdZPE8CDBAgRVxmxFlKQizu2dDIs1ahnFE,5846
24
+ mcpycore/protocol/registry/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
25
+ mcpycore/protocol/registry/registry.py,sha256=54i0JRYheN4INWFjQeWz7GreHP1vE2bGZz9GN7mOq2I,4370
26
+ mcpycore/protocol/serializers/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
27
+ mcpycore/protocol/serializers/buffer.py,sha256=xANJCoPVFH3I4Tmaz0QNA_nc2ZlZYd_Pfp-zeFu_LM8,12035
28
+ mcpycore/protocol/serializers/nbt.py,sha256=vncDFBZwVOiA6yzfYfJk9xbpROPIgqqIjw1hHS1bdLo,7655
29
+ mcpycore/protocol/states/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
30
+ mcpycore/protocol/states/machine.py,sha256=9YD6_AuFBdc8oojL68rw4rT4pJit_xXbPqoGhUPiXUA,3233
31
+ mcpycore/protocol/versions/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
32
+ mcpycore/protocol/versions/base.py,sha256=_sTVJRYclo9veFfH7IsbAdGLmdJUnk16Orz2-AeV5r4,3757
33
+ mcpycore/protocol/versions/adapters/__init__.py,sha256=64q3m7ZpZuWgWm0Lk_4anLqwjriCL7eT9Wb_PoAXdW8,1144
34
+ mcpycore/protocol/versions/v1_20/__init__.py,sha256=oWTWfDnoQ4eMsNUSDCCXQe2XKbbmYhtr8aDyLXI-YpU,154
35
+ mcpycore/protocol/versions/v1_20/packets.py,sha256=TNQg2_l_ahMuF-lZhcFLfr3897uKMnBpkSorywXeews,5434
36
+ mcpycore/protocol/versions/v1_21/__init__.py,sha256=f9IxXPTmrMGKulF2baGq1UrERYMcm21xAlRUiE5Cq8M,154
37
+ mcpycore/protocol/versions/v1_21/packets.py,sha256=8r86hPQrCfcJCdIBhGSSUW1MpmUAO4HuwxA4K6ElsGw,9220
38
+ mcpycore/utils/__init__.py,sha256=BO7NcF4lYLwY2YgmLedwSHiCAHb841k8kxozhVZEjb8,29
39
+ mcpycore/utils/logging.py,sha256=daejyFmI1ygR4wuLucFWKuNC4c6XQ73s7J_1eM2upF0,2518
40
+ mcpycore/utils/metrics.py,sha256=yTJImUjp2orCmoM43dx75wGNrl1v0xOlE8yU1cigI3c,4619
41
+ mcpy_core-1.0.0.dist-info/METADATA,sha256=3fepkhLOUMakYK64FpQbDk33zJb5NQ_E0CsVIJWdVrE,7874
42
+ mcpy_core-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
43
+ mcpy_core-1.0.0.dist-info/top_level.txt,sha256=CCDfYa1t1mLjk7o-Vp0HaDcJyHWDUXm6129PG2yshks,9
44
+ mcpy_core-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Mcpycore Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ mcpycore
mcpycore/__init__.py ADDED
@@ -0,0 +1,127 @@
1
+ """
2
+ McPy-Core — Professional async-first Minecraft Java Edition protocol library.
3
+
4
+ Supports Minecraft 1.20.2 → 1.21.11 (protocols 764–775) + snapshot builds.
5
+
6
+ Quick start::
7
+
8
+ import asyncio
9
+ from mcpycore import MinecraftClient
10
+ from mcpycore.events.emitter import Events
11
+
12
+ async def main():
13
+ client = MinecraftClient(
14
+ host="play.example.com",
15
+ username="BotName",
16
+ debug=True,
17
+ )
18
+
19
+ @client.event
20
+ async def on_connect(c):
21
+ print(f"Connected! version={c.version_name}")
22
+
23
+ @client.event
24
+ async def on_chat(message, sender):
25
+ print(f"[{sender}] {message}")
26
+ await client.send_chat(f"Echo: {message}")
27
+
28
+ @client.event
29
+ async def on_disconnect(reason):
30
+ print(f"Disconnected: {reason}")
31
+
32
+ await client.start()
33
+
34
+ asyncio.run(main())
35
+ """
36
+
37
+ from mcpycore.client.client import MinecraftClient
38
+ from mcpycore.client.connection import (
39
+ PlayerProfile, OfflineProfile, LoginError, ConnectionError,
40
+ )
41
+ from mcpycore.client.reconnect import (
42
+ ReconnectPolicy, NoReconnect, FixedDelay,
43
+ ExponentialBackoff, InfiniteRetry,
44
+ )
45
+ from mcpycore.events.emitter import AsyncEventEmitter, Events
46
+ from mcpycore.protocol.packets.base import Packet, packet
47
+ from mcpycore.protocol.registry.registry import PacketRegistry, Direction, global_registry
48
+ from mcpycore.protocol.serializers.buffer import PacketBuffer
49
+ from mcpycore.protocol.serializers.nbt import (
50
+ parse_nbt, nbt_to_dict,
51
+ NBTTag, NBTCompound, NBTList, NBTInt, NBTString,
52
+ TAG_COMPOUND, TAG_INT, TAG_STRING,
53
+ )
54
+ from mcpycore.protocol.states.machine import State, ProtocolStateMachine
55
+ from mcpycore.protocol.versions.base import (
56
+ VersionAdapter,
57
+ PROTOCOL_1_20_2, PROTOCOL_1_20_4, PROTOCOL_1_20_6,
58
+ PROTOCOL_1_21, PROTOCOL_1_21_1, PROTOCOL_1_21_2, PROTOCOL_1_21_4,
59
+ PROTOCOL_1_21_5, PROTOCOL_1_21_11,
60
+ PROTOCOL_LATEST, SNAPSHOT_BASE,
61
+ version_name, is_snapshot, nearest_stable, ALL_STABLE_PROTOCOLS,
62
+ )
63
+ from mcpycore.crypto.encryption import EncryptionManager
64
+ from mcpycore.compression.compression import CompressionManager
65
+ from mcpycore.debug.inspector import PacketInspector
66
+ from mcpycore.utils.logging import setup_logging, get_logger
67
+ from mcpycore.utils.metrics import MetricsCollector
68
+
69
+ __version__ = "1.0.0"
70
+ __author__ = "McPy-Core Contributors"
71
+ __license__ = "MIT"
72
+ __mc_versions__ = "1.20.2 – 1.21.11"
73
+ __protocols__ = "764 – 775 + snapshots"
74
+ __python_min__ = "3.12"
75
+
76
+ __all__ = [
77
+ # Client
78
+ "MinecraftClient",
79
+ "PlayerProfile",
80
+ "OfflineProfile",
81
+ "LoginError",
82
+ "ConnectionError",
83
+ # Reconnect policies
84
+ "ReconnectPolicy",
85
+ "NoReconnect",
86
+ "FixedDelay",
87
+ "ExponentialBackoff",
88
+ "InfiniteRetry",
89
+ # Events
90
+ "AsyncEventEmitter",
91
+ "Events",
92
+ # Packets
93
+ "Packet",
94
+ "packet",
95
+ "PacketBuffer",
96
+ "PacketRegistry",
97
+ "Direction",
98
+ "global_registry",
99
+ # NBT
100
+ "parse_nbt",
101
+ "nbt_to_dict",
102
+ "NBTTag",
103
+ "NBTCompound",
104
+ "NBTList",
105
+ "NBTInt",
106
+ "NBTString",
107
+ "TAG_COMPOUND",
108
+ "TAG_INT",
109
+ "TAG_STRING",
110
+ # State machine
111
+ "State",
112
+ "ProtocolStateMachine",
113
+ # Versions
114
+ "VersionAdapter",
115
+ "PROTOCOL_1_20_2", "PROTOCOL_1_20_4", "PROTOCOL_1_20_6",
116
+ "PROTOCOL_1_21", "PROTOCOL_1_21_1", "PROTOCOL_1_21_2",
117
+ "PROTOCOL_1_21_4", "PROTOCOL_1_21_5", "PROTOCOL_1_21_11",
118
+ "PROTOCOL_LATEST", "SNAPSHOT_BASE",
119
+ "version_name", "is_snapshot", "nearest_stable", "ALL_STABLE_PROTOCOLS",
120
+ # Infrastructure
121
+ "EncryptionManager",
122
+ "CompressionManager",
123
+ "PacketInspector",
124
+ "setup_logging",
125
+ "get_logger",
126
+ "MetricsCollector",
127
+ ]
@@ -0,0 +1 @@
1
+ """McPy-Core sub-package."""