Skip to content

Commit bc243d8

Browse files
Update documentation HTML
1 parent 383d21a commit bc243d8

28 files changed

+4904
-659
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Requests-toolbelt is written and maintained by Ian Cordasco, Cory Benfield and
2+
various contributors:
3+
4+
Development Lead
5+
````````````````
6+
7+
- Ian Cordasco
8+
9+
- Cory Benfield
10+
11+
12+
Requests
13+
````````
14+
15+
- Kenneth Reitz <me@kennethreitz.com> and various contributors
16+
17+
18+
Urllib3
19+
```````
20+
21+
- Andrey Petrov <andrey.petrov@shazow.net>
22+
23+
24+
Patches and Suggestions
25+
```````````````````````
26+
27+
- Jay De Lanoy <jay@delanoy.co>
28+
29+
- Zhaoyu Luo <luozhaoyu90@gmail.com>
30+
31+
- Markus Unterwaditzer <markus@unterwaditzer.net>
32+
33+
- Bryce Boe <bbzbryce@gmail.com> (@bboe)
34+
35+
- Dan Lipsitt (https://github.com/DanLipsitt)
36+
37+
- Cea Stapleton (http://www.ceastapleton.com)
38+
39+
- Patrick Creech <pcreech@redhat.com>
40+
41+
- Mike Lambert (@mikelambert)
42+
43+
- Ryan Barrett (https://snarfed.org/)
44+
45+
- Victor Grau Serrat (@lacabra)
46+
47+
- Yorgos Pagles <yorgos@pagles.org>
48+
49+
- Thomas Hauk <thauk@copperleaf.com>
50+
51+
- Achim Herwig <python@wodca.de>
52+
53+
- Ryan Ashley <rashley-iqt>
54+
55+
- Sam Bull (@greatestape)
56+
57+
- Florence Blanc-Renaud <flo@redhat.com> (@flo-renaud)
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
APIリファレンス
2+
============
3+
4+
このセクションでは、py2hackCraftの主要なクラスとメソッドについて説明します。
5+
6+
基本クラス
7+
-----------
8+
9+
Player
10+
~~~~~~
11+
12+
サーバーとの接続を管理するクラスです。
13+
14+
.. autoclass:: py2hackCraft.modules.Player
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:
18+
19+
Entity
20+
~~~~~~
21+
22+
エンティティの操作を管理するクラスです。
23+
24+
.. autoclass:: py2hackCraft.modules.Entity
25+
:members:
26+
:undoc-members:
27+
:show-inheritance:
28+
29+
Volume
30+
~~~~~~
31+
32+
3次元の領域を表すクラスです。
33+
34+
.. autoclass:: py2hackCraft.modules.Volume
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
LocationFactory
40+
~~~~~~~~~~~~~
41+
42+
座標を生成するファクトリクラスです。
43+
44+
.. autoclass:: py2hackCraft.modules.LocationFactory
45+
:members:
46+
:undoc-members:
47+
:show-inheritance:
48+
49+
データクラス
50+
-----------
51+
52+
Location
53+
~~~~~~~~
54+
55+
座標を表すデータクラスです。
56+
57+
.. autoclass:: py2hackCraft.modules.Location
58+
:members:
59+
:undoc-members:
60+
:show-inheritance:
61+
62+
Block
63+
~~~~~
64+
65+
ブロックの情報を表すクラスです。
66+
67+
.. autoclass:: py2hackCraft.modules.Block
68+
:members:
69+
:undoc-members:
70+
:show-inheritance:
71+
72+
ItemStack
73+
~~~~~~~~
74+
75+
アイテムスタックの情報を表すクラスです。
76+
77+
.. autoclass:: py2hackCraft.modules.ItemStack
78+
:members:
79+
:undoc-members:
80+
:show-inheritance:
81+
82+
イベントクラス
83+
------------
84+
85+
InteractEvent
86+
~~~~~~~~~~~~
87+
88+
エンティティとの相互作用イベントを表すクラスです。
89+
90+
.. autoclass:: py2hackCraft.modules.InteractEvent
91+
:members:
92+
:undoc-members:
93+
:show-inheritance:
94+
95+
EventMessage
96+
~~~~~~~~~~~
97+
98+
イベントメッセージを表すクラスです。
99+
100+
.. autoclass:: py2hackCraft.modules.EventMessage
101+
:members:
102+
:undoc-members:
103+
:show-inheritance:
104+
105+
ChatMessage
106+
~~~~~~~~~~
107+
108+
チャットメッセージを表すクラスです。
109+
110+
.. autoclass:: py2hackCraft.modules.ChatMessage
111+
:members:
112+
:undoc-members:
113+
:show-inheritance:
114+
115+
RedstonePower
116+
~~~~~~~~~~~~
117+
118+
レッドストーンの出力レベルを表すクラスです。
119+
120+
.. autoclass:: py2hackCraft.modules.RedstonePower
121+
:members:
122+
:undoc-members:
123+
:show-inheritance:

docs/_sources/docs/index.rst.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
py2hackCraft ドキュメントへようこそ!
2+
=====================================
3+
4+
py2hackCraftは、hackCraft2サーバーと対話するためのPythonクライアントライブラリです。
5+
このライブラリを使用することで、PythonからMinecraftの世界を操作することができます。
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
:caption: 目次:
10+
11+
installation
12+
quickstart
13+
api_reference
14+
examples
15+
16+
インストール
17+
-----------
18+
19+
py2hackCraftのインストール方法については、:doc:`installation` を参照してください。
20+
21+
クイックスタート
22+
--------------
23+
24+
基本的な使用方法については、:doc:`quickstart` を参照してください。
25+
26+
APIリファレンス
27+
-------------
28+
29+
詳細なAPIリファレンスについては、:doc:`api_reference` を参照してください。
30+
31+
Indices and tables
32+
==================
33+
34+
* :ref:`genindex`
35+
* :ref:`modindex`
36+
* :ref:`
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
インストール
2+
============
3+
4+
必要条件
5+
-----------
6+
7+
- Python 3.7以上
8+
- pip(Pythonパッケージインストーラー)
9+
10+
インストール方法
11+
-----------
12+
13+
pipを使用してpy2hackCraftをインストールできます:
14+
15+
.. code-block:: bash
16+
17+
pip install py2hackCraft
18+
19+
開発用インストール
20+
----------------------
21+
22+
開発モードでパッケージをインストールする場合:
23+
24+
1. リポジトリのクローン:
25+
.. code-block:: bash
26+
27+
git clone https://github.com/yourusername/hackCraft2-python.git
28+
cd hackCraft2-python
29+
30+
2. 開発モードでインストール:
31+
.. code-block:: bash
32+
33+
pip install -e .
34+
35+
これにより、パッケージが「編集可能」モードでインストールされ、ソースコードを修正した際に再インストールすることなく変更をすぐに反映できます。
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
クイックスタートガイド
2+
===============
3+
4+
このガイドでは、py2hackCraftの基本的な使用方法を説明します。
5+
6+
基本的な使用方法
7+
----------
8+
9+
サーバーに接続してエンティティと対話する簡単な例を示します:
10+
11+
.. code:: python
12+
:force:
13+
14+
from py2hackCraft.modules import Player, Volume, LocationFactory
15+
16+
# プレイヤーインスタンスを作成してサーバーに接続
17+
player = Player("your_name")
18+
player.login("localhost", 25570)
19+
20+
# エンティティを取得してイベントエリアを設定
21+
entity = player.get_entity("entity_name")
22+
entity.set_event_area(Volume.local(10, 10, 10, -10, -10, -10))
23+
24+
# 位置がイベントエリア内かどうかを確認
25+
loc = LocationFactory.local(0, 0, 0)
26+
is_in_area = entity.is_event_area(loc)
27+
print(f"イベントエリア内: {is_in_area}")
28+
29+
# イベントを待機
30+
while True:
31+
message = entity.get_event_message()
32+
if message is not False: # イベントがある場合
33+
print(f"イベントを受信: {message}")
34+
35+
# 終了時にログアウト
36+
player.logout()
37+
38+
一般的な操作
39+
---------------
40+
41+
移動と位置指定
42+
~~~~~~~~~~~~~~~~~~~~
43+
44+
.. code:: python
45+
:force:
46+
47+
# 前進
48+
entity.forward(5) # 5ブロック前進
49+
50+
# 回転
51+
entity.turn_left() # 左に回転
52+
entity.turn_right() # 右に回転
53+
entity.turn(90) # 90度回転
54+
55+
# 特定の座標にテレポート
56+
loc = LocationFactory.absolute(100, 64, -200)
57+
entity.teleport(loc)
58+
59+
ブロック操作
60+
~~~~~~~~~~~~~~
61+
62+
.. code:: python
63+
:force:
64+
65+
# ブロックを設置
66+
# 前方に設置
67+
entity.place()
68+
69+
# 上方に設置
70+
entity.place_up()
71+
72+
# 特定の位置に設置
73+
loc = LocationFactory.local(0, 5, 0)
74+
75+
entity.place_at(loc)
76+
77+
# ブロックを破壊
78+
# 前方のブロックを破壊
79+
entity.dig()
80+
81+
# 上方のブロックを破壊
82+
entity.dig_up()
83+
84+
# 特定の位置のブロックを破壊
85+
# 絶対座標(100, 64, -200)のブロックを壊す
86+
loc = LocationFactory.absolute(100, 64, -200)
87+
88+
entity.dig_at(loc)
89+
90+
# ブロックの調査
91+
# 前方のブロックを調査
92+
block = entity.inspect()
93+
94+
print(f"ブロックの種類: {block.name}")
95+
96+
イベント処理
97+
~~~~~~~~~~~~
98+
99+
.. code:: python
100+
:force:
101+
102+
# イベントメッセージの送信
103+
entity.send_message("target_entity", "こんにちは!")
104+
105+
# イベントメッセージの受信
106+
while True:
107+
message = entity.get_event_message()
108+
if message is not False: # イベントがある場合
109+
print(f"イベントを受信: {message}")
110+
111+
より詳細な例とAPIリファレンスについては、:doc:`api_reference` セクションを参照してください。

0 commit comments

Comments
 (0)