py2hackCraft2 1.0.5__tar.gz → 1.0.7__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.5 → py2hackCraft2-1.0.7}/PKG-INFO +1 -1
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft/modules.py +9 -5
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft2.egg-info/PKG-INFO +1 -1
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/setup.py +1 -1
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/README.md +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft/__init__.py +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft/material.py +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft2.egg-info/SOURCES.txt +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft2.egg-info/dependency_links.txt +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft2.egg-info/requires.txt +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/py2hackCraft2.egg-info/top_level.txt +0 -0
- {py2hackCraft2-1.0.5 → py2hackCraft2-1.0.7}/setup.cfg +0 -0
|
@@ -77,7 +77,7 @@ class _WebSocketClient:
|
|
|
77
77
|
elif(type == 'logged'):
|
|
78
78
|
self.connected = True
|
|
79
79
|
self.result = data
|
|
80
|
-
elif(type == '
|
|
80
|
+
elif(type == 'attach'):
|
|
81
81
|
self.result = data
|
|
82
82
|
elif(type == 'event'):
|
|
83
83
|
jsonEvent = json.loads(data)
|
|
@@ -91,6 +91,8 @@ class _WebSocketClient:
|
|
|
91
91
|
callback_thread.start()
|
|
92
92
|
# callback(jsonEvent['data'])
|
|
93
93
|
return
|
|
94
|
+
else:
|
|
95
|
+
self.result = data
|
|
94
96
|
self.response_event.set() # イベントをセットして、メッセージの受信を通知
|
|
95
97
|
except json.JSONDecodeError:
|
|
96
98
|
logging.error("JSONDecodeError '%s'" % message)
|
|
@@ -264,13 +266,15 @@ class Player:
|
|
|
264
266
|
raise UninitializedClientError("Client is not initialized")
|
|
265
267
|
|
|
266
268
|
message = {
|
|
267
|
-
"type": "
|
|
269
|
+
"type": "attach",
|
|
270
|
+
"data": {"entity": name}
|
|
268
271
|
}
|
|
269
272
|
self.client.send(json.dumps(message))
|
|
270
|
-
|
|
271
|
-
|
|
273
|
+
uuid = self.client.result
|
|
274
|
+
if(uuid is None):
|
|
275
|
+
raise ValueError("Entity '%s' not found" % name)
|
|
272
276
|
|
|
273
|
-
return Entity(self.client, self.world,
|
|
277
|
+
return Entity(self.client, self.world, uuid)
|
|
274
278
|
|
|
275
279
|
class World:
|
|
276
280
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|