py2hackCraft2 1.0.26__tar.gz → 1.0.28__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.26
3
+ Version: 1.0.28
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,25 @@ 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
+ print(self.client.result)
898
+ block = Block(** json.loads(self.client.result))
899
+ return block
900
+
882
901
  def inspectX(self, x: int, y: int, z: int, cord: Coordinates = Coordinates.local) -> Block :
883
902
  """
884
903
  指定された座標のブロックを調べる
@@ -912,12 +931,12 @@ class Entity:
912
931
 
913
932
  def inspect(self) -> Block :
914
933
  """
915
- 自分のいる場所のブロックを調べる
934
+ 自分の前方のブロックを調べる
916
935
 
917
936
  Returns:
918
937
  Block: 調べたブロックの情報
919
938
  """
920
- self.client.sendCall(self.uuid, "inspect", [0, 0, 0])
939
+ self.client.sendCall(self.uuid, "inspect", [0, 0, 1])
921
940
  block = Block(** json.loads(self.client.result))
922
941
  return block
923
942
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.26
3
+ Version: 1.0.28
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.26",
8
+ version="1.0.28",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "websocket-client" # websocketライブラリの追加
File without changes
File without changes