py2hackCraft2 1.0.24__tar.gz → 1.0.26__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.24 → py2hackcraft2-1.0.26}/PKG-INFO +1 -1
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft/modules.py +18 -17
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft2.egg-info/PKG-INFO +1 -1
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/setup.py +1 -1
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/README.md +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft/__init__.py +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft/material.py +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft2.egg-info/SOURCES.txt +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft2.egg-info/dependency_links.txt +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft2.egg-info/requires.txt +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/py2hackCraft2.egg-info/top_level.txt +0 -0
- {py2hackcraft2-1.0.24 → py2hackcraft2-1.0.26}/setup.cfg +0 -0
|
@@ -172,7 +172,7 @@ class Side:
|
|
|
172
172
|
top = "Top"
|
|
173
173
|
bottom = "Bottom"
|
|
174
174
|
|
|
175
|
-
@dataclass
|
|
175
|
+
@dataclass(frozen=True)
|
|
176
176
|
class Location:
|
|
177
177
|
"""
|
|
178
178
|
座標を表すデータクラス
|
|
@@ -188,7 +188,7 @@ class Location:
|
|
|
188
188
|
z: int
|
|
189
189
|
world: str = "world"
|
|
190
190
|
|
|
191
|
-
@dataclass
|
|
191
|
+
@dataclass(frozen=True)
|
|
192
192
|
class InteractEvent:
|
|
193
193
|
"""
|
|
194
194
|
クリックイベントを表すデータクラス
|
|
@@ -218,7 +218,7 @@ class InteractEvent:
|
|
|
218
218
|
y: int = 0
|
|
219
219
|
z: int = 0
|
|
220
220
|
|
|
221
|
-
@dataclass
|
|
221
|
+
@dataclass(frozen=True)
|
|
222
222
|
class EventMessage:
|
|
223
223
|
"""
|
|
224
224
|
イベントメッセージを表すデータクラス
|
|
@@ -234,7 +234,7 @@ class EventMessage:
|
|
|
234
234
|
message: str
|
|
235
235
|
|
|
236
236
|
|
|
237
|
-
@dataclass
|
|
237
|
+
@dataclass(frozen=True)
|
|
238
238
|
class ChatMessage:
|
|
239
239
|
"""
|
|
240
240
|
チャットメッセージを表すデータクラス
|
|
@@ -249,7 +249,7 @@ class ChatMessage:
|
|
|
249
249
|
entityUuid: str
|
|
250
250
|
message: str
|
|
251
251
|
|
|
252
|
-
@dataclass
|
|
252
|
+
@dataclass(frozen=True)
|
|
253
253
|
class RedstonePower:
|
|
254
254
|
"""
|
|
255
255
|
レッドストーン信号を表すデータクラス
|
|
@@ -262,7 +262,7 @@ class RedstonePower:
|
|
|
262
262
|
oldCurrent: int
|
|
263
263
|
newCurrent: int
|
|
264
264
|
|
|
265
|
-
@dataclass
|
|
265
|
+
@dataclass(frozen=True)
|
|
266
266
|
class Block:
|
|
267
267
|
"""
|
|
268
268
|
ブロックを表すデータクラス
|
|
@@ -297,7 +297,7 @@ class Block:
|
|
|
297
297
|
z: int = 0
|
|
298
298
|
world: str = "world"
|
|
299
299
|
|
|
300
|
-
@dataclass
|
|
300
|
+
@dataclass(frozen=True)
|
|
301
301
|
class ItemStack:
|
|
302
302
|
slot: int = 0
|
|
303
303
|
name: str = "air"
|
|
@@ -364,11 +364,12 @@ class Inventory:
|
|
|
364
364
|
"""
|
|
365
365
|
インベントリを表すクラス
|
|
366
366
|
"""
|
|
367
|
-
def __init__(self, client: _WebSocketClient, entityUUID: str, world: str, x: int, y: int, z:int, size:int):
|
|
367
|
+
def __init__(self, client: _WebSocketClient, entityUUID: str, world: str, x: int, y: int, z:int, size:int, items: list):
|
|
368
368
|
self.client = client
|
|
369
369
|
self.entityUUID = entityUUID
|
|
370
370
|
self.location = Location(x, y, z, world)
|
|
371
371
|
self.size = size
|
|
372
|
+
self.items = items
|
|
372
373
|
|
|
373
374
|
def getItem(self, slot: int) -> ItemStack :
|
|
374
375
|
"""
|
|
@@ -401,25 +402,25 @@ class Inventory:
|
|
|
401
402
|
"""
|
|
402
403
|
self.client.sendCall(self.entityUUID, "moveInventoryItem", [self.location.x, self.location.y, self.location.z, slot1, slot2])
|
|
403
404
|
|
|
404
|
-
def storeItem(self,
|
|
405
|
+
def storeItem(self, item: ItemStack, slot: int):
|
|
405
406
|
"""
|
|
406
407
|
チェストを開いたエンティティーのインベントリからこのインベントリにアイテムを入れる
|
|
407
408
|
|
|
408
409
|
Args:
|
|
409
|
-
|
|
410
|
-
|
|
410
|
+
item (ItemStack): 引き出し元になるペットのアイテム
|
|
411
|
+
slot (int): 格納先になるチェストのアイテムスロット番号
|
|
411
412
|
"""
|
|
412
|
-
self.client.sendCall(self.entityUUID, "storeInventoryItem", [self.location.x, self.location.y, self.location.z,
|
|
413
|
+
self.client.sendCall(self.entityUUID, "storeInventoryItem", [self.location.x, self.location.y, self.location.z, item.slot, slot])
|
|
413
414
|
|
|
414
|
-
def retrieveItem(self,
|
|
415
|
+
def retrieveItem(self, slot: int, item: ItemStack):
|
|
415
416
|
"""
|
|
416
417
|
チェストを開いたエンティティーのインベントリからこのインベントリからアイテムを取り出す
|
|
417
418
|
|
|
418
419
|
Args:
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
slot (int): 格納先になるペットのアイテムスロット番号
|
|
421
|
+
item (ItemStack): 引き出し元になるチェストのアイテム
|
|
421
422
|
"""
|
|
422
|
-
self.client.sendCall(self.entityUUID, "retrieveInventoryItem", [self.location.x, self.location.y, self.location.z,
|
|
423
|
+
self.client.sendCall(self.entityUUID, "retrieveInventoryItem", [self.location.x, self.location.y, self.location.z, slot, item.slot])
|
|
423
424
|
|
|
424
425
|
|
|
425
426
|
class Entity:
|
|
@@ -578,7 +579,7 @@ class Entity:
|
|
|
578
579
|
self.client.sendCall(self.uuid, "addForce", [x, y, z])
|
|
579
580
|
return str_to_bool(self.client.result)
|
|
580
581
|
|
|
581
|
-
def jump(self
|
|
582
|
+
def jump(self):
|
|
582
583
|
"""
|
|
583
584
|
ジャンプさせる
|
|
584
585
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|