py2hackCraft2 1.0.22__tar.gz → 1.0.24__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.22 → py2hackcraft2-1.0.24}/PKG-INFO +1 -1
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft/modules.py +3 -58
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft2.egg-info/PKG-INFO +1 -1
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/setup.py +1 -1
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/README.md +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft/__init__.py +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft/material.py +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft2.egg-info/SOURCES.txt +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft2.egg-info/dependency_links.txt +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft2.egg-info/requires.txt +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/py2hackCraft2.egg-info/top_level.txt +0 -0
- {py2hackcraft2-1.0.22 → py2hackcraft2-1.0.24}/setup.cfg +0 -0
|
@@ -450,25 +450,6 @@ class Entity:
|
|
|
450
450
|
self.client.waitFor(self.uuid, 'onEntityRedstone')
|
|
451
451
|
return RedstonePower(** self.client.result)
|
|
452
452
|
|
|
453
|
-
def waitForBreakBlock(self):
|
|
454
|
-
"""
|
|
455
|
-
プレイヤーがブロックをこわすまで待つ
|
|
456
|
-
"""
|
|
457
|
-
self.client.waitFor(self.uuid, 'onPlayerBlockBreak')
|
|
458
|
-
return Block(** self.client.result)
|
|
459
|
-
|
|
460
|
-
def setOnInteractEvent(self, callbackFunc: Callable[['Entity', 'InteractEvent'], Any]):
|
|
461
|
-
"""
|
|
462
|
-
プレイヤーがイベントアイテムを使った時に呼び出されるコールバック関数を設定する
|
|
463
|
-
"""
|
|
464
|
-
def callbackWrapper(data):
|
|
465
|
-
logging.debug("onInteractEvent callbackWrapper '%s'" % data)
|
|
466
|
-
if(data['entityUuid'] == self.uuid):
|
|
467
|
-
logging.debug("callbackWrapper '%s'" % data)
|
|
468
|
-
event = InteractEvent(**data["event"])
|
|
469
|
-
callbackFunc(self, event)
|
|
470
|
-
self.client.setCallback('onInteractEvent', callbackWrapper)
|
|
471
|
-
|
|
472
453
|
def setOnMessage(self, callbackFunc: Callable[['Entity', str], Any]):
|
|
473
454
|
"""
|
|
474
455
|
カスタムイベントメッセージを受信したときに呼び出されるコールバック関数を設定する
|
|
@@ -1034,34 +1015,23 @@ class Entity:
|
|
|
1034
1015
|
self.client.sendCall(self.uuid, "isCanDigDown")
|
|
1035
1016
|
return str_to_bool(self.client.result)
|
|
1036
1017
|
|
|
1037
|
-
def lookAtTarget(self, uuid) -> bool:
|
|
1038
|
-
"""
|
|
1039
|
-
指定されたエンティティを見る
|
|
1040
|
-
Args:
|
|
1041
|
-
uuid (str): エンティティのUUID
|
|
1042
|
-
Returns:
|
|
1043
|
-
bool: 調べた結果
|
|
1044
|
-
"""
|
|
1045
|
-
self.client.sendCall(self.uuid, "lookAtTarget", [uuid])
|
|
1046
|
-
return str_to_bool(self.client.result)
|
|
1047
|
-
|
|
1048
1018
|
def getDistance(self) -> float :
|
|
1049
1019
|
"""
|
|
1050
|
-
|
|
1020
|
+
自分と前方のなにかとの距離を調べる
|
|
1051
1021
|
"""
|
|
1052
1022
|
self.client.sendCall(self.uuid, "getTargetDistanceFront")
|
|
1053
1023
|
return self.client.result
|
|
1054
1024
|
|
|
1055
1025
|
def getDistanceUp(self) -> float :
|
|
1056
1026
|
"""
|
|
1057
|
-
|
|
1027
|
+
自分と真上のなにかとの距離を調べる
|
|
1058
1028
|
"""
|
|
1059
1029
|
self.client.sendCall(self.uuid, "getTargetDistanceUp")
|
|
1060
1030
|
return float(self.client.result)
|
|
1061
1031
|
|
|
1062
1032
|
def getDistanceDown(self) -> float :
|
|
1063
1033
|
"""
|
|
1064
|
-
|
|
1034
|
+
自分と真下のなにかとの距離を調べる
|
|
1065
1035
|
"""
|
|
1066
1036
|
self.client.sendCall(self.uuid, "getTargetDistanceDown")
|
|
1067
1037
|
return self.client.result
|
|
@@ -1073,31 +1043,6 @@ class Entity:
|
|
|
1073
1043
|
self.client.sendCall(self.uuid, "getTargetDistance", [uuid])
|
|
1074
1044
|
return self.client.result
|
|
1075
1045
|
|
|
1076
|
-
def setBlock(self, x: int, y: int, z: int, block: str, data: int = 0):
|
|
1077
|
-
"""
|
|
1078
|
-
指定された座標にブロックを設置する(クリエイティブ)
|
|
1079
|
-
|
|
1080
|
-
Args:
|
|
1081
|
-
x (int): 絶対的なX座標
|
|
1082
|
-
y (int): 絶対的なY座標
|
|
1083
|
-
z (int): 絶対的なZ座標
|
|
1084
|
-
block (str): 設置するブロックの種類
|
|
1085
|
-
"""
|
|
1086
|
-
self.client.sendCall(self.uuid, "setBlock", [x, y, z, "", block, data])
|
|
1087
|
-
|
|
1088
|
-
def getBlock(self, x: int, y: int, z: int) -> Block :
|
|
1089
|
-
"""
|
|
1090
|
-
指定された座標のブロックを取得する
|
|
1091
|
-
|
|
1092
|
-
Args:
|
|
1093
|
-
x (int): 絶対的なX座標
|
|
1094
|
-
y (int): 絶対的なY座標
|
|
1095
|
-
z (int): 絶対的なZ座標
|
|
1096
|
-
"""
|
|
1097
|
-
self.client.sendCall(self.uuid, "getBlock", [x, y, z])
|
|
1098
|
-
block = Block(** json.loads(self.client.result))
|
|
1099
|
-
return block
|
|
1100
|
-
|
|
1101
1046
|
def getBlockByColor(self, color: str) -> Block :
|
|
1102
1047
|
"""
|
|
1103
1048
|
指定された色に近いブロックを取得する
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|