Library for creating servers and clients Minecraft Java Edition
Project description
pyCubes
pyCubes is a library for creating servers and clients Minecraft Java Edition.
❗ 0.x versions are not stable. The library API is subject to change.
Installation:
pip install pyCubes
Usage
First you need to create application instance:
import cubes
app = cubes.Application()
After that add a low-level handler:
async def process_handshake(packet_id: int, packet: cubes.ReadBuffer):
print('Protocol version:', packet.varint)
print('Server host:', packet.string)
print('Server port:', packet.unsigned_short)
print('Next state:', cubes.ConnectionStatus(packet.varint))
app.add_low_level_handler(cubes.ConnectionStatus.HANDSHAKE, 0x00, process_handshake)
All that remains is to launch the application:
app.run('127.0.0.1', 25565)
A more detailed example can be found here.
All packages are described here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyCubes-0.2.0.tar.gz
(9.0 kB
view hashes)
Built Distribution
pyCubes-0.2.0-py3-none-any.whl
(10.1 kB
view hashes)