py2hackCraft2 1.0.31__tar.gz → 1.0.33__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.
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/PKG-INFO +1 -1
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft/modules.py +24 -1
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft2.egg-info/PKG-INFO +1 -1
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/setup.py +1 -1
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/README.md +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft/__init__.py +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft/material.py +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft2.egg-info/SOURCES.txt +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft2.egg-info/dependency_links.txt +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft2.egg-info/requires.txt +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/py2hackCraft2.egg-info/top_level.txt +0 -0
- {py2hackcraft2-1.0.31 → py2hackcraft2-1.0.33}/setup.cfg +0 -0
|
@@ -5,6 +5,7 @@ import json
|
|
|
5
5
|
import logging
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from typing import Callable, Any
|
|
8
|
+
from typing import Optional
|
|
8
9
|
|
|
9
10
|
def str_to_bool(s):
|
|
10
11
|
"""
|
|
@@ -796,6 +797,27 @@ class Entity:
|
|
|
796
797
|
self.client.sendCall(self.uuid, "digX", [x, y, z, cord])
|
|
797
798
|
return str_to_bool(self.client.result)
|
|
798
799
|
|
|
800
|
+
def pickupItemsX(self, x : int, y: int, z: int, cord: Coordinates = Coordinates.local) -> int :
|
|
801
|
+
"""
|
|
802
|
+
指定した座標の周辺のアイテムを拾う
|
|
803
|
+
|
|
804
|
+
Args:
|
|
805
|
+
x (int): X座標
|
|
806
|
+
y (int): Y座標
|
|
807
|
+
z (int): Z座標
|
|
808
|
+
cord (Coordinates): 座標の種類('', '^', '~')
|
|
809
|
+
"""
|
|
810
|
+
self.client.sendCall(self.uuid, "pickupItemsX", [x, y, z, cord])
|
|
811
|
+
return int(self.client.result)
|
|
812
|
+
|
|
813
|
+
def pickupItems(self) -> int :
|
|
814
|
+
"""
|
|
815
|
+
自分の周辺のアイテムを拾う
|
|
816
|
+
|
|
817
|
+
"""
|
|
818
|
+
self.client.sendCall(self.uuid, "pickupItemsX", [0, 0, 0, "^"])
|
|
819
|
+
return int(self.client.result)
|
|
820
|
+
|
|
799
821
|
def action(self) -> bool :
|
|
800
822
|
"""
|
|
801
823
|
自分の前方の装置を使う
|
|
@@ -879,7 +901,7 @@ class Entity:
|
|
|
879
901
|
"""
|
|
880
902
|
self.client.sendCall(self.uuid, "sendChat", [message])
|
|
881
903
|
|
|
882
|
-
def findNearbyBlockX(self, x: int, y: int, z: int, cord: Coordinates, block: str, maxDepth: int) -> Block
|
|
904
|
+
def findNearbyBlockX(self, x: int, y: int, z: int, cord: Coordinates, block: str, maxDepth: int) -> Optional[Block]:
|
|
883
905
|
"""
|
|
884
906
|
指定された座標を中心に近くのブロックを取得する
|
|
885
907
|
|
|
@@ -895,6 +917,7 @@ class Entity:
|
|
|
895
917
|
"""
|
|
896
918
|
self.client.sendCall(self.uuid, "findNearbyBlockX", [x, y, z, cord, block, maxDepth])
|
|
897
919
|
|
|
920
|
+
print('result = ', self.client.result)
|
|
898
921
|
# resultがNoneまたは空のケースに対応
|
|
899
922
|
if not self.client.result:
|
|
900
923
|
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|