Added a null check for block & world in setBlockSneaky