py2hackCraft2 1.0.15__tar.gz → 1.0.16__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.15
3
+ Version: 1.0.16
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
@@ -8,6 +8,7 @@ Author-email: masafumi_t@0x48lab.com
8
8
  License: MIT
9
9
  Keywords: hackCraft2
10
10
  Description-Content-Type: text/markdown
11
+ Requires-Dist: websocket-client
11
12
 
12
13
  ## 概要
13
14
 
@@ -558,6 +558,12 @@ class Entity:
558
558
  self.client.sendCall(self.uuid, "addForce", [x, y, z])
559
559
  return str_to_bool(self.client.result)
560
560
 
561
+ def jump(self, degrees: int):
562
+ """
563
+ ジャンプさせる。
564
+ """
565
+ self.client.sendCall(self.uuid, "jump")
566
+
561
567
  def turn(self, degrees: int):
562
568
  """
563
569
  自分を回転させる。
@@ -567,11 +573,17 @@ class Entity:
567
573
  """
568
574
  self.client.sendCall(self.uuid, "turn", [degrees])
569
575
 
570
- def placeHere(self, x, y, z) -> bool :
576
+ def placeX(self, x, y, z, cord) -> bool :
571
577
  """
572
- 自分を中心に指定した座標にブロックを設置する。
578
+ 指定した座標にブロックを設置する。
579
+
580
+ Args:
581
+ x (int): X座標。
582
+ y (int): Y座標。
583
+ z (int): Z座標。
584
+ cord (str): 座標の種類('', '^', '~')。
573
585
  """
574
- self.client.sendCall(self.uuid, "placeX", [x, y, z])
586
+ self.client.sendCall(self.uuid, "placeX", [x, y, z, cord])
575
587
  return str_to_bool(self.client.result)
576
588
 
577
589
  def place(self) -> bool :
@@ -616,11 +628,17 @@ class Entity:
616
628
  self.client.sendCall(self.uuid, "useItemDown")
617
629
  return str_to_bool(self.client.result)
618
630
 
619
- def useItemHere(self, x, y, z) -> bool :
631
+ def useItemX(self, x, y, z, cord) -> bool :
620
632
  """
621
- 自分を中心に指定した座標にアイテムを使う
633
+ 指定した座標にアイテムを使う
634
+
635
+ Args:
636
+ x (int): X座標。
637
+ y (int): Y座標。
638
+ z (int): Z座標。
639
+ cord (str): 座標の種類('', '^', '~')。
622
640
  """
623
- self.client.sendCall(self.uuid, "useItemX", [x, y, z])
641
+ self.client.sendCall(self.uuid, "useItemX", [x, y, z, cord])
624
642
  return str_to_bool(self.client.result)
625
643
 
626
644
  def harvest(self) -> bool :
@@ -658,11 +676,17 @@ class Entity:
658
676
  self.client.sendCall(self.uuid, "digDown")
659
677
  return str_to_bool(self.client.result)
660
678
 
661
- def digHere(self, x, y, z) -> bool :
679
+ def digX(self, x, y, z, cord) -> bool :
662
680
  """
663
- 自分を中心に指定した座標のブロックを壊す。
681
+ 指定した座標のブロックを壊す。
682
+
683
+ Args:
684
+ x (int): X座標。
685
+ y (int): Y座標。
686
+ z (int): Z座標。
687
+ cord (str): 座標の種類('', '^', '~')。
664
688
  """
665
- self.client.sendCall(self.uuid, "digX", [x, y, z])
689
+ self.client.sendCall(self.uuid, "digX", [x, y, z, cord])
666
690
  return str_to_bool(self.client.result)
667
691
 
668
692
  def action(self) -> bool :
@@ -729,7 +753,7 @@ class Entity:
729
753
  self.client.sendCall(self.uuid, "dropItem", [slot1])
730
754
  return str_to_bool(self.client.result)
731
755
 
732
- def holdItem(self, slot: int) -> bool :
756
+ def grabItem(self, slot: int) -> bool :
733
757
  """
734
758
  自分のインベントリのアイテムを手に持たせる。
735
759
 
@@ -748,18 +772,19 @@ class Entity:
748
772
  """
749
773
  self.client.sendCall(self.uuid, "sendChat", [message])
750
774
 
751
- def inspectHere(self, x: int, y: int, z: int) -> Block :
775
+ def inspectX(self, x: int, y: int, z: int, cord: str) -> Block :
752
776
  """
753
- 自分を中心に指定された座標のブロックを調べる。
777
+ 指定された座標のブロックを調べる。
754
778
 
755
779
  Args:
756
780
  x (int): X座標。
757
781
  y (int): Y座標。
758
782
  z (int): Z座標。
783
+ cord (str): 座標の種類('', '^', '~')。
759
784
  Returns:
760
785
  Block: 調べたブロックの情報。
761
786
  """
762
- self.client.sendCall(self.uuid, "inspect", [x, y, z])
787
+ self.client.sendCall(self.uuid, "inspect", [x, y, z, cord])
763
788
  block = Block(** json.loads(self.client.result))
764
789
  return block
765
790
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py2hackCraft2
3
- Version: 1.0.15
3
+ Version: 1.0.16
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
@@ -8,6 +8,7 @@ Author-email: masafumi_t@0x48lab.com
8
8
  License: MIT
9
9
  Keywords: hackCraft2
10
10
  Description-Content-Type: text/markdown
11
+ Requires-Dist: websocket-client
11
12
 
12
13
  ## 概要
13
14
 
@@ -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.15",
8
+ version="1.0.16",
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  "websocket-client" # websocketライブラリの追加
File without changes
File without changes