This is a complete rewrite of BlocksOnGlass, without NMS code