py2hackCraft2 1.0.18__tar.gz → 1.0.20__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.18
3
+ Version: 1.0.20
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
@@ -10,3 +10,7 @@ build:
10
10
  deploy:
11
11
  <command>
12
12
  twine upload --repository-url https://upload.pypi.org/legacy/ dist/* -u "__token__"
13
+
14
+ doc:
15
+ <command>
16
+ make html
@@ -161,6 +161,17 @@ class Coordinates:
161
161
  relative = "~"
162
162
  local = "^"
163
163
 
164
+ class Side:
165
+ """
166
+ ブロックの配置方向を表すデータクラス
167
+ """
168
+ right = "Right"
169
+ left = "Left"
170
+ front = "Front"
171
+ back = "Back"
172
+ top = "Top"
173
+ bottom = "Bottom"
174
+
164
175
  @dataclass
165
176
  class Location:
166
177
  """
@@ -634,22 +645,22 @@ class Entity:
634
645
  """
635
646
  自分の前方にブロックを設置する。
636
647
  """
637
- self.client.sendCall(self.uuid, "placeFront")
638
- return str_to_bool(self.client.result, [side])
648
+ self.client.sendCall(self.uuid, "placeFront", [side])
649
+ return str_to_bool(self.client.result)
639
650
 
640
651
  def placeUp(self, side=None) -> bool :
641
652
  """
642
653
  自分の真上にブロックを設置する。
643
654
  """
644
- self.client.sendCall(self.uuid, "placeUp")
645
- return str_to_bool(self.client.result, [side])
655
+ self.client.sendCall(self.uuid, "placeUp", [side])
656
+ return str_to_bool(self.client.result)
646
657
 
647
658
  def placeDown(self, side=None) -> bool :
648
659
  """
649
660
  自分の真下にブロックを設置する。
650
661
  """
651
- self.client.sendCall(self.uuid, "placeDown")
652
- return str_to_bool(self.client.result, [side])
662
+ self.client.sendCall(self.uuid, "placeDown", [side])
663
+ return str_to_bool(self.client.result)
653
664
 
654
665
  def useItemX(self, cord: Coordinates, x: int, y: int, z: int) -> bool :
655
666
  """
@@ -937,6 +948,34 @@ class Entity:
937
948
  self.client.sendCall(self.uuid, "isBlockedDown")
938
949
  return str_to_bool(self.client.result)
939
950
 
951
+
952
+ def canDig(self) -> bool :
953
+ """
954
+ 自分の前方のブロックが壊せるかどうか調べる。
955
+ Returns:
956
+ bool: 調べた結果。
957
+ """
958
+ self.client.sendCall(self.uuid, "isCanDigFront")
959
+ return str_to_bool(self.client.result)
960
+
961
+ def canDigUp(self) -> bool :
962
+ """
963
+ 自分の上のブロックが壊せるかどうか調べる。
964
+ Returns:
965
+ bool: 調べた結果。
966
+ """
967
+ self.client.sendCall(self.uuid, "isCanDigUp")
968
+ return str_to_bool(self.client.result)
969
+
970
+ def canDigDown(self) -> bool :
971
+ """
972
+ 自分の下のブロックが壊せるかどうか調べる。
973
+ Returns:
974
+ bool: 調べた結果。
975
+ """
976
+ self.client.sendCall(self.uuid, "isCanDigDown")
977
+ return str_to_bool(self.client.result)
978
+
940
979
  def lookAtTarget(self, uuid) -> bool:
941
980
  """
942
981
  指定されたエンティティを見る。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.18
3
+ Version: 1.0.20
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.18",
8
+ version="1.0.20",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "websocket-client" # websocketライブラリの追加
File without changes