forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
19
project/raspberry/py/event.py
Executable file
19
project/raspberry/py/event.py
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
from vec3 import Vec3
|
||||
|
||||
class TileEvent:
|
||||
HIT = 0
|
||||
|
||||
def __init__(self, type, x, y, z, face, entityId):
|
||||
self.type = type
|
||||
self.pos = Vec3(x, y, z)
|
||||
self.face = face
|
||||
self.entityId = entityId
|
||||
|
||||
def __str__(self):
|
||||
types = {TileEvent.HIT: "Hit"}
|
||||
return "TileEvent(%s @ %s:%d by %d)"%(types.get(self.type, 0),
|
||||
self.pos, self.face, self.entityId);
|
||||
|
||||
@staticmethod
|
||||
def Hit(x, y, z, face, entityId):
|
||||
return TileEvent(TileEvent.HIT, x, y, z, face, entityId)
|
||||
Loading…
Add table
Add a link
Reference in a new issue