Properly implementing world.setBlockMetadataWithNotify() and code cleanup