Guest User

Untitled

a guest
Oct 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. def on_block_destroy(self, x, y, z, value):
  2. if (self.mode == SNIPER_MODE and value == DESTROY_BLOCK and
  3. self.tool == PICKAXE_TOOL):
  4. map = self.protocol.map
  5. if (not map.get_solid(x, y, z-1) and not map.get_solid(x, y, z-2) and not
  6. map.get_solid(x, y, z-3)):
  7. block_location = (x, y, z-13)
  8. player_location = self.world_object.position
  9. player_location = (player_location.x, player_location.y, player_location.z)
  10. dist = floor(distance_3d(player_location, block_location))
  11. return False
  12. else:
  13. return False
  14. return connection.on_block_destroy(self, x, y, z, value)
Add Comment
Please, Sign In to add comment