function getBlocks(dir: Direction, loc: location, p: player):
if {_dir} is west or east:
add (block south {_loc})' location to {_return::*}
add (block south under {_loc})' location to {_return::*}
add (block south above {_loc})' location to {_return::*}
add (block north {_loc})' location to {_return::*}
add (block north under {_loc})' location to {_return::*}
add (block north above {_loc})' location to {_return::*}
if {_dir} is north or south:
add (block west {_loc})' location to {_return::*}
add (block west under {_loc})' location to {_return::*}
add (block west above {_loc})' location to {_return::*}
add (block east {_loc})' location to {_return::*}
add (block east under {_loc})' location to {_return::*}
add (block east above {_loc})' location to {_return::*}
add (block above {_loc})' location to {_return::*}
add (block under {_loc})' location to {_return::*}
return {_return::*}
on right click:
name of player's tool is "3x3"
break getBlocks(player's facing, location of clicked block, player) naturally using player's tool