mcflayer 0.5.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.
- mcflayer-0.5.0.dist-info/METADATA +70 -0
- mcflayer-0.5.0.dist-info/RECORD +80 -0
- mcflayer-0.5.0.dist-info/WHEEL +4 -0
- mcflayer-0.5.0.dist-info/entry_points.txt +3 -0
- pyflayer/__init__.py +92 -0
- pyflayer/_data/LICENSE +13 -0
- pyflayer/_data/dataPaths.json +26 -0
- pyflayer/_data/pc/1.8/biomes.json +804 -0
- pyflayer/_data/pc/1.8/blockCollisionShapes.json +274 -0
- pyflayer/_data/pc/1.8/blocks.json +5363 -0
- pyflayer/_data/pc/1.8/effects.json +140 -0
- pyflayer/_data/pc/1.8/entities.json +580 -0
- pyflayer/_data/pc/1.8/foods.json +310 -0
- pyflayer/_data/pc/1.8/items.json +3733 -0
- pyflayer/_data/pc/1.8/materials.json +61 -0
- pyflayer/_data/pc/1.8/protocol.json +3438 -0
- pyflayer/_data/pc/1.8/version.json +5 -0
- pyflayer/_data/pc/1.8/windows.json +229 -0
- pyflayer/_internal/__init__.py +8 -0
- pyflayer/_internal/clock.py +115 -0
- pyflayer/_internal/cpu.py +53 -0
- pyflayer/_internal/log.py +22 -0
- pyflayer/_internal/util.py +56 -0
- pyflayer/actions/__init__.py +1 -0
- pyflayer/bot/__init__.py +15 -0
- pyflayer/bot/bot.py +536 -0
- pyflayer/bot/chat.py +146 -0
- pyflayer/cli.py +98 -0
- pyflayer/data/__init__.py +53 -0
- pyflayer/data/features.py +123 -0
- pyflayer/data/loader.py +250 -0
- pyflayer/data/registries.py +330 -0
- pyflayer/data/schema.py +133 -0
- pyflayer/data/shapes.py +68 -0
- pyflayer/data/versions.py +122 -0
- pyflayer/errors.py +249 -0
- pyflayer/events/__init__.py +52 -0
- pyflayer/events/base.py +48 -0
- pyflayer/events/bus.py +415 -0
- pyflayer/events/catalog.py +168 -0
- pyflayer/ext/__init__.py +1 -0
- pyflayer/ext/commands/__init__.py +1 -0
- pyflayer/ext/tasks/__init__.py +1 -0
- pyflayer/models/__init__.py +39 -0
- pyflayer/models/aabb.py +93 -0
- pyflayer/models/chat.py +46 -0
- pyflayer/models/enums.py +98 -0
- pyflayer/models/items.py +44 -0
- pyflayer/models/protocols.py +61 -0
- pyflayer/models/text.py +153 -0
- pyflayer/models/vec3.py +163 -0
- pyflayer/pathfinder/__init__.py +1 -0
- pyflayer/physics/__init__.py +1 -0
- pyflayer/protocol/__init__.py +44 -0
- pyflayer/protocol/auth/__init__.py +20 -0
- pyflayer/protocol/auth/base.py +86 -0
- pyflayer/protocol/auth/microsoft.py +275 -0
- pyflayer/protocol/auth/offline.py +81 -0
- pyflayer/protocol/auth/session_join.py +82 -0
- pyflayer/protocol/buffer.py +336 -0
- pyflayer/protocol/client.py +365 -0
- pyflayer/protocol/connection.py +226 -0
- pyflayer/protocol/crypto.py +66 -0
- pyflayer/protocol/framing.py +171 -0
- pyflayer/protocol/protodef.py +713 -0
- pyflayer/protocol/registry.py +84 -0
- pyflayer/protocol/state.py +109 -0
- pyflayer/protocol/status.py +223 -0
- pyflayer/protocol/types/__init__.py +39 -0
- pyflayer/protocol/types/bitset.py +22 -0
- pyflayer/protocol/types/nbt.py +384 -0
- pyflayer/protocol/types/position.py +57 -0
- pyflayer/protocol/types/slot.py +73 -0
- pyflayer/protocol/types/uuid.py +45 -0
- pyflayer/protocol/varint.py +161 -0
- pyflayer/py.typed +0 -0
- pyflayer/swarm/__init__.py +1 -0
- pyflayer/testing/__init__.py +7 -0
- pyflayer/testing/fake_server.py +276 -0
- pyflayer/world/__init__.py +1 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mcflayer
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: asyncio Minecraft Java Edition bot library - transport, data, codecs, login and events
|
|
5
|
+
Author: PyFlayer contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: cryptography>=42
|
|
9
|
+
Requires-Dist: dnspython>=2.6
|
|
10
|
+
Requires-Dist: httpx>=0.27
|
|
11
|
+
Requires-Dist: msgspec>=0.18
|
|
12
|
+
Requires-Dist: numpy>=1.26
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: hypothesis>=6.100; extra == 'dev'
|
|
15
|
+
Requires-Dist: import-linter>=2.0; extra == 'dev'
|
|
16
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
17
|
+
Requires-Dist: pyright>=1.1.360; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# PyFlayer
|
|
24
|
+
|
|
25
|
+
An asyncio Minecraft Java Edition bot library: Mineflayer's protocol, world and physics, with a
|
|
26
|
+
command layer shaped like discord.py.
|
|
27
|
+
|
|
28
|
+
**Status:** Milestone 2 (transport, codecs, login/auth, encryption, event bus, minimal bot) is
|
|
29
|
+
implemented against **Minecraft 1.8.9 / protocol 47** and verified live on PikaNetwork. World,
|
|
30
|
+
physics, commands and pathfinding are M3–M7. See [docs/sessions.md](docs/sessions.md) for the
|
|
31
|
+
session log and [docs/tasks.md](docs/tasks.md) for the task board.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install mcflayer # distribution name; the import package is `pyflayer`
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The PyPI distribution is `mcflayer` (the `pyflayer` name is taken); the import name is unchanged:
|
|
40
|
+
`import pyflayer`.
|
|
41
|
+
|
|
42
|
+
## Quick start
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python3 -m venv .venv
|
|
46
|
+
source .venv/bin/activate
|
|
47
|
+
pip install -e .[dev]
|
|
48
|
+
|
|
49
|
+
# Ping a server (server list ping)
|
|
50
|
+
python -m pyflayer.protocol.status play.example.org
|
|
51
|
+
|
|
52
|
+
# Join a server, print chat and send one message
|
|
53
|
+
python -m pyflayer.cli play.pika-network.net --username Steve --timeout 15 --chat hello
|
|
54
|
+
|
|
55
|
+
# Run the tests
|
|
56
|
+
pytest
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Layout
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
src/pyflayer/ library code (src layout, typed)
|
|
63
|
+
data/pc/1.8/ vendored subset of PrismarineJS/minecraft-data (MIT)
|
|
64
|
+
tests/ unit, golden and loopback tests
|
|
65
|
+
docs/ MkDocs site: architecture, roadmap, prompts, module docs, sessions, tasks
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
The docs are MkDocs (Material theme). Install `requirements-docs.txt` and run `mkdocs serve`.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
pyflayer/__init__.py,sha256=8kRoKNEQpVJnmXh-KtXebXMt_yX2RLcEXScnHRh4btM,2063
|
|
2
|
+
pyflayer/cli.py,sha256=EOm15ZjpCVnxhwJo1b7GE919zbUEIFi5JF08DPSncvY,3262
|
|
3
|
+
pyflayer/errors.py,sha256=wUVTxrF5rYp4HzI2gcr_1nxR6w8JBx5yxt_wtjesUZU,7069
|
|
4
|
+
pyflayer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
pyflayer/_internal/__init__.py,sha256=kLaWmFOWtzNKngSFNuByvCAnhFsgxjh9FccAMY3WA3M,287
|
|
6
|
+
pyflayer/_internal/clock.py,sha256=5yQYAClpbZqBa2UrpNuIHtl5AHbiqwy65oxwk4Qer74,3802
|
|
7
|
+
pyflayer/_internal/cpu.py,sha256=g8dlhHCz4AXpjC20fRELi-i1T05ZMx6u7Sn4DbUvpEg,1555
|
|
8
|
+
pyflayer/_internal/log.py,sha256=MlOwAvMDI1_ZKYL5TvmG1JWl_1ae4SaWsJAyJD7HuQI,741
|
|
9
|
+
pyflayer/_internal/util.py,sha256=DJTix474G7rg_lr2ZZ-edUhk2lkBv1V8Xs6XcbWRNKc,1643
|
|
10
|
+
pyflayer/actions/__init__.py,sha256=3nj-YpssQGHrUJqpo1fTlo0ulhtI9TmkQ56BeN4RLkA,57
|
|
11
|
+
pyflayer/bot/__init__.py,sha256=x9E9gDeCB_EUuyPZC7wokrTfGRQNd3xsbVdv6Eb8ZYg,365
|
|
12
|
+
pyflayer/bot/bot.py,sha256=ICxKUTFx_JZVOhA6p_tVX-K7HmSRItTr09NHwj1rRT8,19064
|
|
13
|
+
pyflayer/bot/chat.py,sha256=0-eSYzzTp5Ub0x4pXJCp4kkylSBps6vDMop7L0V936c,5148
|
|
14
|
+
pyflayer/data/__init__.py,sha256=FkBJBcwHTLbRRqHdSh1atU_WEle3XiaQ8g5QLH-r6ho,1045
|
|
15
|
+
pyflayer/data/features.py,sha256=BjwU65XD3vjaVnZIc1czj86RECOumJcqTI31uCuZ_xU,3964
|
|
16
|
+
pyflayer/data/loader.py,sha256=NXufdD4AUuSwExEjtO72y6iBMoXVi_bFy6IiovAbSOs,9168
|
|
17
|
+
pyflayer/data/registries.py,sha256=JErF3cpmuPrSm3Z6NvmkTUqKPYh8IRBkbbB618GS3Sg,9266
|
|
18
|
+
pyflayer/data/schema.py,sha256=2D6p2GDojFvjcmhy83uL57NjYdPDPyWmyJDVEVJQv1o,3213
|
|
19
|
+
pyflayer/data/shapes.py,sha256=ROaR_XhQ218XYvlAw-yJ5F2VDftDdRJxEiz2TyQf4jY,2734
|
|
20
|
+
pyflayer/data/versions.py,sha256=Jkhsz3bLY-EeLO_MkU6ZKtzLjLavxIgwwy1UdV8Dtv4,3579
|
|
21
|
+
pyflayer/events/__init__.py,sha256=GaNzYPZstcnGVEPHcAPsHaN-b0vbarkqwfWpl87YCwY,1275
|
|
22
|
+
pyflayer/events/base.py,sha256=q4ekTXs5LBbufIJMrkYUEJlmhTkWBjSfGXYXOB0K-Xs,1325
|
|
23
|
+
pyflayer/events/bus.py,sha256=IBBjTLo7aZl_lWbI_hU8NMdo2OA7nu2VzAo1lFehxtA,14581
|
|
24
|
+
pyflayer/events/catalog.py,sha256=q-4teXBPssiFkaAnAJIH84PpPF3azcen5zF-RFz7mo8,3476
|
|
25
|
+
pyflayer/ext/__init__.py,sha256=zV_JIpiFMpmgVfyByJKZe-hiHigI-ikI6aSNKifSVtg,53
|
|
26
|
+
pyflayer/ext/commands/__init__.py,sha256=o3RPcIpRLZDV6e4w_JagmPlZIQFChcH6Jyxv4nlYgnY,58
|
|
27
|
+
pyflayer/ext/tasks/__init__.py,sha256=4AkAEApFE_Q8ZJwXltOlnNEwpFd-YUtpI4u2wLbqp5g,55
|
|
28
|
+
pyflayer/models/__init__.py,sha256=GhfLdckxMY4mFhMfuM9gJLpmD9R12mJ2ilpItj3sK48,880
|
|
29
|
+
pyflayer/models/aabb.py,sha256=4PdcVJOBlCSzD7FZbePjghXo5aa63P1c4VHIFKCK3gE,2606
|
|
30
|
+
pyflayer/models/chat.py,sha256=bptaMFbvZ_wHfzzok0X2X-QzLdO53PYi_C3iX9XHFeo,1495
|
|
31
|
+
pyflayer/models/enums.py,sha256=0y35z3modQo4AaiuGXqtiUhpcEZQdlS1LqC8Y0y6jKQ,2044
|
|
32
|
+
pyflayer/models/items.py,sha256=DCVcbpyf-2flMgIw3uKLa1-yYOG6TZRpcv7HFeJcCw0,1406
|
|
33
|
+
pyflayer/models/protocols.py,sha256=y_s3VPeXNtid1E-u8lV7cwrRRtWLbcteQ73XZnZbOxY,1592
|
|
34
|
+
pyflayer/models/text.py,sha256=f5KpIXQhPWdKAX6s26p1LdkWrFhevrhosjjmDO5ttos,5646
|
|
35
|
+
pyflayer/models/vec3.py,sha256=Zvy-8kgHN8qkiszkvNy-V0yGVZlQFN0TM3__eLgXItY,4730
|
|
36
|
+
pyflayer/pathfinder/__init__.py,sha256=Hl7qexPFotprccldoxR1prpMaOY7P74Isl81eJ-5n4k,60
|
|
37
|
+
pyflayer/physics/__init__.py,sha256=AJUyJQwqeVvngjxUjQZsfpfaXC2xkhsK8HXhtcZc2bA,57
|
|
38
|
+
pyflayer/protocol/__init__.py,sha256=aGFfGftpmch6eSytDZRmTVVW5gd6EhO12tmnXcWdntw,1437
|
|
39
|
+
pyflayer/protocol/buffer.py,sha256=afOnLQHzXs5o7h5YVrHTrQhNuJ9G74NReRAa8nZ0DrQ,12119
|
|
40
|
+
pyflayer/protocol/client.py,sha256=cPDhRhSGlccKEFCFK_A1JCEBusYnXBVBOrjIagu7t5s,14048
|
|
41
|
+
pyflayer/protocol/connection.py,sha256=xJZcUmHl6narYUCdg-913lWwtMCRYsSHlwy2St7DyOI,8169
|
|
42
|
+
pyflayer/protocol/crypto.py,sha256=EOkRzoGXJ70YzO8TKOEcOP97u0sr4MlOgfKxwVfIwpo,2467
|
|
43
|
+
pyflayer/protocol/framing.py,sha256=pNy_TDreIGlakXqAGlMQo3tyxE4GQA12PBTfgsihuXQ,6347
|
|
44
|
+
pyflayer/protocol/protodef.py,sha256=_HhV5LZEZjSK-hdppSJj3xc2oA_Op2ITQG7h1cByjf4,26871
|
|
45
|
+
pyflayer/protocol/registry.py,sha256=tRmpgYt0a29sZZHURTYiXF2OG1GPMc7UMTVMuvxBQcU,3510
|
|
46
|
+
pyflayer/protocol/state.py,sha256=OsyAclUjLoccIPD967X6CqEULmHkKqMnVaGT7hsWx0I,3828
|
|
47
|
+
pyflayer/protocol/status.py,sha256=ETGAeBpc5nzIezmqQhrZNpeaDcFvAPByaXoe_v2DiNo,8011
|
|
48
|
+
pyflayer/protocol/varint.py,sha256=2xeMexJVH-HCT73Mk0PaMJ9OtpE830iYN7EVwVVlVv0,5307
|
|
49
|
+
pyflayer/protocol/auth/__init__.py,sha256=A8gKYetZSoH1JF4UJA9mJJbYfe62UJ6yQjtS_C7UiNY,610
|
|
50
|
+
pyflayer/protocol/auth/base.py,sha256=NN9_tnPSx2D8IAMscbZzIc3WfRdZELxKT8kTJmX1umI,2611
|
|
51
|
+
pyflayer/protocol/auth/microsoft.py,sha256=0fd-PnDzWB1BjSexc9OixfpTrjtEIJajYOTdAxxrsZU,11330
|
|
52
|
+
pyflayer/protocol/auth/offline.py,sha256=egQmiEmtWCaUvKP2iFL2ZzIWvr-OIkKAGEJn0C14YBU,2665
|
|
53
|
+
pyflayer/protocol/auth/session_join.py,sha256=7S-2lNImorDqDM1JfEtDBSicwqrufIDfe3fIRgoyL2g,2946
|
|
54
|
+
pyflayer/protocol/types/__init__.py,sha256=3e7-OrFdM8JW1vhBmUMFqXFb2A3E6mRbPcPoCPx9970,951
|
|
55
|
+
pyflayer/protocol/types/bitset.py,sha256=2GHZ0x_vx03j1yCyAMD0zUBVHQ_4S7U4FX1L087d9O0,888
|
|
56
|
+
pyflayer/protocol/types/nbt.py,sha256=PLtDS1uU4vcesbr6_96YfL-bmdoQlzuPpXB3RPFtLkU,12898
|
|
57
|
+
pyflayer/protocol/types/position.py,sha256=U476ioAo1V6ECE8o-I8STJNcKquaUYK69CA76owGqwA,1834
|
|
58
|
+
pyflayer/protocol/types/slot.py,sha256=BiDt7X--poA_vwePEHUjuJfRXwH97FWggbQjJAtAj5A,3266
|
|
59
|
+
pyflayer/protocol/types/uuid.py,sha256=5kV_D86w4jMYBNetC4C2cBLdb_YjnfXADSaLckZUYgM,1371
|
|
60
|
+
pyflayer/swarm/__init__.py,sha256=KcRHJMSIr0sw8f3OIPXbmipHTlfRTNDauJq9Q8AkpCg,55
|
|
61
|
+
pyflayer/testing/__init__.py,sha256=JJ6ceCRbC8IIHxfkW65Od9ltRaJEl4FrnsBMlmBFw9E,203
|
|
62
|
+
pyflayer/testing/fake_server.py,sha256=iXUfJgP_sbm3WSSYQfYZhCk6E40kD-L2C87XOa_CQSE,10496
|
|
63
|
+
pyflayer/world/__init__.py,sha256=UIUNHYYJBt7Ire7ijBRGVhjzL0evObfo07KKP4-xBwU,55
|
|
64
|
+
pyflayer/_data/LICENSE,sha256=F39cNgP5uV4gvJdkU-4-WRcP8QkVbiFWSSrYBZ9QHIQ,794
|
|
65
|
+
pyflayer/_data/dataPaths.json,sha256=5g2z_s03Uo1TgKaRTvWVQ5dU0qPU_uffEA9syxdpMvA,601
|
|
66
|
+
pyflayer/_data/pc/1.8/biomes.json,sha256=FDBAg5One9gr8H-QFdaGKB45aIiuqSOoSm51NLWfID0,18018
|
|
67
|
+
pyflayer/_data/pc/1.8/blockCollisionShapes.json,sha256=s0XfqskcPA1fa0p0ioV5D7tLJiYLfrkZAzL0TI3mpl8,9080
|
|
68
|
+
pyflayer/_data/pc/1.8/blocks.json,sha256=78GWIrtXKSaF0Zm7NByujGv4LxxwCxV3VcSk7fkgKqA,101825
|
|
69
|
+
pyflayer/_data/pc/1.8/effects.json,sha256=hSoZXy5wYGi_nGY-z0bGB28XvYwR7bl35eyJRml1P8M,2294
|
|
70
|
+
pyflayer/_data/pc/1.8/entities.json,sha256=vrNbyLEVl_g_51xHTVlP02vjsl_DmlRgpCGABsatxi4,10982
|
|
71
|
+
pyflayer/_data/pc/1.8/foods.json,sha256=YSexulirwwBJtWJc96Z5A78KACZBuVAyJuJInwDExw8,6248
|
|
72
|
+
pyflayer/_data/pc/1.8/items.json,sha256=pO_BoARM-hmWUHUCz95eYKMw4qb5e32NZSaIGXiOzUg,68083
|
|
73
|
+
pyflayer/_data/pc/1.8/materials.json,sha256=LbeImZi_P3DxfdHSo0sIKMu3p_lri0yZaDNnpdfBswM,777
|
|
74
|
+
pyflayer/_data/pc/1.8/protocol.json,sha256=1uJlpdzs3o6OAdSFqY8sNlEYu-APxldVBP7Q-dAaMo8,86094
|
|
75
|
+
pyflayer/_data/pc/1.8/version.json,sha256=DJuHEJx0DTVZcfoaCwulZpaiiDsRQeThZh-wq9QwV-w,72
|
|
76
|
+
pyflayer/_data/pc/1.8/windows.json,sha256=jgkPCGjH-e5ZWKEH-hCgYQhLM6bMv4viYFST634jbYg,3472
|
|
77
|
+
mcflayer-0.5.0.dist-info/METADATA,sha256=bhcQhKRTgI_TKQXt4Ajq6DrRnrtHhaoIoobyFmDLT2g,2205
|
|
78
|
+
mcflayer-0.5.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
79
|
+
mcflayer-0.5.0.dist-info/entry_points.txt,sha256=DzrvPZhhxkBGSRakEVR98NTRD-3KO9mSMXU-2yP5qaE,103
|
|
80
|
+
mcflayer-0.5.0.dist-info/RECORD,,
|
pyflayer/__init__.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""PyFlayer: asyncio Minecraft Java Edition bot library.
|
|
2
|
+
|
|
3
|
+
M1 is the transport/data/codec foundation. The reference target is **Minecraft 1.8.9 (protocol 47)**;
|
|
4
|
+
version-specific behaviour is feature-gated so newer versions can be added with data, not package
|
|
5
|
+
rewrites. See ``docs/sessions.md`` and ``docs/tasks.md``.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
>>> import pyflayer
|
|
9
|
+
>>> pyflayer.McData.load("1.8.9").version.protocol
|
|
10
|
+
47
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
from pyflayer import errors
|
|
16
|
+
from pyflayer.bot import Bot
|
|
17
|
+
from pyflayer.data import Features, McData, VersionInfo
|
|
18
|
+
from pyflayer.errors import PyFlayerError
|
|
19
|
+
from pyflayer.events import ChatEvent, EventBus, JoinEvent, SpawnEvent
|
|
20
|
+
from pyflayer.models import (
|
|
21
|
+
AABB,
|
|
22
|
+
BlockPos,
|
|
23
|
+
ChatComponent,
|
|
24
|
+
ChatMessage,
|
|
25
|
+
ChunkPos,
|
|
26
|
+
Dimension,
|
|
27
|
+
GameMode,
|
|
28
|
+
ItemStack,
|
|
29
|
+
SectionPos,
|
|
30
|
+
Vec3,
|
|
31
|
+
)
|
|
32
|
+
from pyflayer.protocol import (
|
|
33
|
+
Connection,
|
|
34
|
+
ConnectionState,
|
|
35
|
+
FrameCodec,
|
|
36
|
+
Packet,
|
|
37
|
+
PacketReader,
|
|
38
|
+
PacketRegistry,
|
|
39
|
+
PacketWriter,
|
|
40
|
+
ProtocolClient,
|
|
41
|
+
StateMachine,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
__version__ = "0.5.0"
|
|
45
|
+
PROTOCOL_VERSION = 47
|
|
46
|
+
REFERENCE_VERSION = "1.8.9"
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
"AABB",
|
|
50
|
+
"BlockPos",
|
|
51
|
+
"Bot",
|
|
52
|
+
"ChatComponent",
|
|
53
|
+
"ChatEvent",
|
|
54
|
+
"ChatMessage",
|
|
55
|
+
"ChunkPos",
|
|
56
|
+
"Connection",
|
|
57
|
+
"ConnectionState",
|
|
58
|
+
"Dimension",
|
|
59
|
+
"EventBus",
|
|
60
|
+
"Features",
|
|
61
|
+
"FrameCodec",
|
|
62
|
+
"GameMode",
|
|
63
|
+
"ItemStack",
|
|
64
|
+
"JoinEvent",
|
|
65
|
+
"McData",
|
|
66
|
+
"PROTOCOL_VERSION",
|
|
67
|
+
"Packet",
|
|
68
|
+
"PacketReader",
|
|
69
|
+
"PacketRegistry",
|
|
70
|
+
"PacketWriter",
|
|
71
|
+
"ProtocolClient",
|
|
72
|
+
"PyFlayerError",
|
|
73
|
+
"REFERENCE_VERSION",
|
|
74
|
+
"SectionPos",
|
|
75
|
+
"ServerStatus",
|
|
76
|
+
"SpawnEvent",
|
|
77
|
+
"StateMachine",
|
|
78
|
+
"Vec3",
|
|
79
|
+
"VersionInfo",
|
|
80
|
+
"__version__",
|
|
81
|
+
"errors",
|
|
82
|
+
"ping",
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def __getattr__(name: str) -> object:
|
|
87
|
+
# Server List Ping types are loaded lazily; see pyflayer.protocol.__getattr__.
|
|
88
|
+
if name in {"ServerStatus", "ping"}:
|
|
89
|
+
from pyflayer.protocol import status
|
|
90
|
+
|
|
91
|
+
return getattr(status, name)
|
|
92
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
pyflayer/_data/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Vendored data notice
|
|
2
|
+
|
|
3
|
+
`data/pc/1.8/` contains a small, pinned subset of
|
|
4
|
+
[PrismarineJS/minecraft-data](https://github.com/PrismarineJS/minecraft-data), fetched from `master`
|
|
5
|
+
on 2026-11-20. `minecraft-data` is distributed under the MIT license (see its `package.json` and the
|
|
6
|
+
upstream repository); this notice is kept so the provenance is never lost.
|
|
7
|
+
|
|
8
|
+
Only the files needed for the M1 data loader and codec compiler are included. The upstream
|
|
9
|
+
`version.json` reports `minecraftVersion: 1.8.8` and `version: 47`; Minecraft 1.8.9 uses the same
|
|
10
|
+
protocol and data, so docs refer to the reference target as **1.8.9 / protocol 47**.
|
|
11
|
+
|
|
12
|
+
To support another version, add its `pc/<version>` files and an entry in `data/dataPaths.json`, or
|
|
13
|
+
point `PYFLAYER_DATA_DIR` at a full `minecraft-data/data` checkout.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pc": {
|
|
3
|
+
"1.8": {
|
|
4
|
+
"attributes": "pc/1.8",
|
|
5
|
+
"biomes": "pc/1.8",
|
|
6
|
+
"blockCollisionShapes": "pc/1.8",
|
|
7
|
+
"blocks": "pc/1.8",
|
|
8
|
+
"effects": "pc/1.8",
|
|
9
|
+
"enchantments": "pc/1.8",
|
|
10
|
+
"entities": "pc/1.8",
|
|
11
|
+
"foods": "pc/1.8",
|
|
12
|
+
"instruments": "pc/1.8",
|
|
13
|
+
"items": "pc/1.8",
|
|
14
|
+
"language": "pc/1.8",
|
|
15
|
+
"mapIcons": "pc/1.7",
|
|
16
|
+
"materials": "pc/1.8",
|
|
17
|
+
"particles": "pc/1.8",
|
|
18
|
+
"proto": "pc/1.8",
|
|
19
|
+
"protocol": "pc/1.8",
|
|
20
|
+
"recipes": "pc/1.8",
|
|
21
|
+
"tints": "pc/1.16.2",
|
|
22
|
+
"version": "pc/1.8",
|
|
23
|
+
"windows": "pc/1.8"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|