Example #1
0
 def pollBlockHits(self):
     """Only triggered by sword => [BlockEvent]"""
     s = self.conn.sendReceive("events.block.hits")
     events = [e for e in s.split("|") if e]
     return [BlockEvent.Hit(*map(int, e.split(","))) for e in events]
Example #2
0
 def pollProjectileHits(self, id):
     """Only triggered by projectiles => [BlockEvent]"""
     s = self.conn.sendReceive(self.pkg + ".events.projectile.hits", id)
     events = [e for e in s.split("|") if e]
     return [BlockEvent.Hit(*map(int, e.split(","))) for e in events]