Fix critical bug for placing blocks and getting inventory. Add examples
which test both of these.