py2hackCraft2 1.0.27__tar.gz → 1.0.29__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.27
3
+ Version: 1.0.29
4
4
  Summary: These are APIs that connect to the hackCraft2 server from Python to manipulate pets.
5
5
  Home-page: https://pypi.org/project/py2hackCraft2/
6
6
  Author: Masafumi Terazono
@@ -879,6 +879,29 @@ class Entity:
879
879
  """
880
880
  self.client.sendCall(self.uuid, "sendChat", [message])
881
881
 
882
+ def findNearbyBlockX(self, x: int, y: int, z: int, cord: Coordinates, block: str, maxDepth: int) -> Block :
883
+ """
884
+ 指定された座標を中心に近くのブロックを取得する
885
+
886
+ Args:
887
+ x (int): X座標
888
+ y (int): Y座標
889
+ z (int): Z座標
890
+ cord (Coordinates): 座標の種類('', '^', '~')
891
+ block (str): ブロックの名前( "water:0" など)
892
+ maxDepth (int): 探索する最大の深さ
893
+ Returns:
894
+ Block: 調べたブロックの情報
895
+ """
896
+ self.client.sendCall(self.uuid, "findNearbyBlockX", [x, y, z, cord, block, maxDepth])
897
+ result = json.loads(self.client.result)
898
+
899
+ if not result: # resultが空の辞書であれば
900
+ return None
901
+
902
+ block = Block(**result)
903
+ return block
904
+
882
905
  def inspectX(self, x: int, y: int, z: int, cord: Coordinates = Coordinates.local) -> Block :
883
906
  """
884
907
  指定された座標のブロックを調べる
@@ -912,7 +935,7 @@ class Entity:
912
935
 
913
936
  def inspect(self) -> Block :
914
937
  """
915
- 自分のいる場所のブロックを調べる
938
+ 自分の前方のブロックを調べる
916
939
 
917
940
  Returns:
918
941
  Block: 調べたブロックの情報
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.27
3
+ Version: 1.0.29
4
4
  Summary: These are APIs that connect to the hackCraft2 server from Python to manipulate pets.
5
5
  Home-page: https://pypi.org/project/py2hackCraft2/
6
6
  Author: Masafumi Terazono
@@ -5,7 +5,7 @@ long_description = (this_directory / "py2hackCraft/README.md").read_text()
5
5
 
6
6
  setup(
7
7
  name="py2hackCraft2",
8
- version="1.0.27",
8
+ version="1.0.29",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "websocket-client" # websocketライブラリの追加
File without changes
File without changes