Utilities for automating Minecraft building via the Minecraft websocket API
Project description
wsminer
Minecraft Python Scripting
This library facilitates writing Python scripts to automate building in Minecraft. Note that this does not work with realms or console based versions of Minecraft as they do not have the appropriate functionality. Minecraft has a command to connect to a local server using a websocket connection. To facilitate iterative development of build scripts, this library consists of a server remains connected to your Minecraft application and a library of commands to send to the server. The server then relays the commands to the Minecraft application.
To use this library.
-
Start the server using the following command. The server will print out a command that you should run within the Minecraft chat window. python -m wsminer.server
-
Startup Minecraft
-
Connect to the server using the command that was printed out by the server. This should be run from the chat window.
-
Write and run a Python script to connect to the server and send commands.
import asyncio
import wsminer
async def main():
client = wsminer.Client()
await client.connect()
await client.build_pyramid(20, 'glowstone')
# await client.draw_cone(50, 'ice')
# await client.draw_sphere(20, 'cobblestone')
# await client.draw_image_nn("butterfly.png")
asyncio.get_event_loop().run_until_complete(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wsminer-0.1.tar.gz.
File metadata
- Download URL: wsminer-0.1.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34777993924cc4b2504209eee2a1063f76c719797ffbc62f92d345a153bca528
|
|
| MD5 |
4f2f67aff0d56d7dd72f2a61907eb269
|
|
| BLAKE2b-256 |
b5a08458aa8cafc61370c05bd08512ba5e890db82abcfec4a211e38147830605
|
File details
Details for the file wsminer-0.1-py3-none-any.whl.
File metadata
- Download URL: wsminer-0.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d7b8488a3c82e02b196be1d42e7e7611bdc6117f548b2d9744ef0f601ef9be1
|
|
| MD5 |
e336fc7d7ce063c17e74566d8fd99b09
|
|
| BLAKE2b-256 |
da642b1b5b76228f17badcde7e38414508eecbe6efd6c58e8004546bc2672efc
|