Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def on_block_destroy(self, x, y, z, value):
- if (self.mode == SNIPER_MODE and value == DESTROY_BLOCK and
- self.tool == PICKAXE_TOOL):
- map = self.protocol.map
- if (not map.get_solid(x, y, z-1) and not map.get_solid(x, y, z-2) and not
- map.get_solid(x, y, z-3)):
- block_location = (x, y, z-13)
- player_location = self.world_object.position
- player_location = (player_location.x, player_location.y, player_location.z)
- dist = floor(distance_3d(player_location, block_location))
- return False
- else:
- return False
- return connection.on_block_destroy(self, x, y, z, value)
Add Comment
Please, Sign In to add comment