Skip to main content

These are APIs that connect to the hackCraft2 server from Python to manipulate pets.

Project description

概要

py2hackCraft2はhackCraft2にpythonから接続し命令をするためのライブラリです。
hackCraft2がどういうものかについて、くわしくはhackCraft2のダウンロードページを参考していただくとして、
簡単に説明をするとhackCraft2はMinecraft java editionのサーバープラグインです。
このプラグインを導入すると、Minecraft上でプログラミングができるようになります。
Minecraftについて何かについてくわしくはインターネットで検索をして調べてください。
hackCraft2を導入されたMinecraftサーバーにpy2hackCraft2をつかえばPythonから命令をすることができます。

次に、py2hackCraft2のインストール方法、それから利用方法を説明します。

インストール方法

次のコマンドを実行して、プロジェクトをローカルマシンにセットアップします:

python3 -m pip install py2hackCraft2

利用方法

以下のコードはシンプルなコードで、ペットをその場でくるくる回らせるように命令するプログラムです。

from py2hackCraft.modules import Player


player = Player("masafumi_t")
player.login("localhost", 25570)

hello = player.get_entity("hello")

for i in range(5):
    hello.forward()
    hello.turn_right()

player.logout()

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

py2hackCraft2-1.0.35.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py2hackCraft2-1.0.35-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file py2hackCraft2-1.0.35.tar.gz.

File metadata

  • Download URL: py2hackCraft2-1.0.35.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for py2hackCraft2-1.0.35.tar.gz
Algorithm Hash digest
SHA256 0cb97f7298610bfe68a0f81ed1f1927d3cffa91a121d3c87618ff6e950e5e2bd
MD5 7ae3a445ba340aa0319f905f1f809313
BLAKE2b-256 b3545f2436102a48c4c1eb582b5a6118b514b619c08ef62105de041f07786696

See more details on using hashes here.

File details

Details for the file py2hackCraft2-1.0.35-py3-none-any.whl.

File metadata

  • Download URL: py2hackCraft2-1.0.35-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for py2hackCraft2-1.0.35-py3-none-any.whl
Algorithm Hash digest
SHA256 7b84ea89013828554b3afcf8f89dec18e0074c1fc63505d1d16ec0656fa2069e
MD5 95807432ab30322dd85f9ab4b17c92a6
BLAKE2b-256 b8f216e41722b0a8d736e6fe9a91c13a766e942be030e263841e6a0a3ea718ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page