py2hackCraft2 1.0.13__tar.gz → 1.0.15__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.13 → py2hackCraft2-1.0.15}/PKG-INFO +1 -1
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft/modules.py +39 -1
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft2.egg-info/PKG-INFO +1 -1
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/setup.py +1 -1
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/README.md +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft/__init__.py +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft/material.py +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft2.egg-info/SOURCES.txt +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft2.egg-info/dependency_links.txt +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft2.egg-info/requires.txt +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/py2hackCraft2.egg-info/top_level.txt +0 -0
- {py2hackCraft2-1.0.13 → py2hackCraft2-1.0.15}/setup.cfg +0 -0
|
@@ -311,8 +311,15 @@ class Player:
|
|
|
311
311
|
result = self.client.result
|
|
312
312
|
if(result is None):
|
|
313
313
|
raise ValueError("Entity '%s' not found" % name)
|
|
314
|
+
|
|
314
315
|
|
|
315
|
-
|
|
316
|
+
entity = Entity(self.client, self.world, result)
|
|
317
|
+
#ロールバックできるように設定
|
|
318
|
+
self.client.send(json.dumps({
|
|
319
|
+
"type": "start",
|
|
320
|
+
"data": {"entity": entity.uuid}
|
|
321
|
+
}))
|
|
322
|
+
return entity
|
|
316
323
|
|
|
317
324
|
class Inventory:
|
|
318
325
|
"""
|
|
@@ -386,6 +393,9 @@ class Entity:
|
|
|
386
393
|
self.uuid = uuid
|
|
387
394
|
self.positions = []
|
|
388
395
|
|
|
396
|
+
def reset(self):
|
|
397
|
+
self.client.sendCall(self.uuid, "restoreArea")
|
|
398
|
+
|
|
389
399
|
def waitForPlayerChat(self):
|
|
390
400
|
"""
|
|
391
401
|
チャットを受信するまでまつ
|
|
@@ -620,6 +630,13 @@ class Entity:
|
|
|
620
630
|
self.client.sendCall(self.uuid, "digX", [0, 0, 0])
|
|
621
631
|
return str_to_bool(self.client.result)
|
|
622
632
|
|
|
633
|
+
def attack(self) -> bool :
|
|
634
|
+
"""
|
|
635
|
+
自分の前方を攻撃する。
|
|
636
|
+
"""
|
|
637
|
+
self.client.sendCall(self.uuid, "attack")
|
|
638
|
+
return str_to_bool(self.client.result)
|
|
639
|
+
|
|
623
640
|
def dig(self) -> bool :
|
|
624
641
|
"""
|
|
625
642
|
自分の前方のブロックを壊す。
|
|
@@ -648,6 +665,27 @@ class Entity:
|
|
|
648
665
|
self.client.sendCall(self.uuid, "digX", [x, y, z])
|
|
649
666
|
return str_to_bool(self.client.result)
|
|
650
667
|
|
|
668
|
+
def action(self) -> bool :
|
|
669
|
+
"""
|
|
670
|
+
自分の前方の装置を使う。
|
|
671
|
+
"""
|
|
672
|
+
self.client.sendCall(self.uuid, "actionFront")
|
|
673
|
+
return str_to_bool(self.client.result)
|
|
674
|
+
|
|
675
|
+
def actionUp(self) -> bool :
|
|
676
|
+
"""
|
|
677
|
+
自分の真上の装置を使う。
|
|
678
|
+
"""
|
|
679
|
+
self.client.sendCall(self.uuid, "actionUp")
|
|
680
|
+
return str_to_bool(self.client.result)
|
|
681
|
+
|
|
682
|
+
def actionDown(self) -> bool :
|
|
683
|
+
"""
|
|
684
|
+
自分の真下の装置を使う。
|
|
685
|
+
"""
|
|
686
|
+
self.client.sendCall(self.uuid, "actionDown")
|
|
687
|
+
return str_to_bool(self.client.result)
|
|
688
|
+
|
|
651
689
|
def setItem(self, slot: int, block: str) -> bool :
|
|
652
690
|
"""
|
|
653
691
|
自分のインベントリにアイテムを設定する。
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|