@Override
	public void applyGravity(Block block) {
		
		int stability = calculateStability(block);
		
		if (stability < STABILITY_MIN || stability > STABILITY_MAX) {
			throw new IllegalStateException("Got invalid stability "+stability+" for "+block);
		}
		
		if (stability == STABILITY_MIN) {
			// Block will fall due to instability
			block.setType(Material.AIR); // Set block to air now, replace it with falling sand after the next if-statement
			// If block beneath isn't grav block and isn't a stable material, break it
			Block beneath = block.getRelative(BlockFace.DOWN);
			if (beneath != null && !beneath.isEmpty() && 
					!doesGravityEffect(beneath.getType()) && !STABLE_MATERIALS.contains(beneath.getType())) {
				beneath.breakNaturally();
			}
			// Make the block fall
			block.getWorld().spawnFallingBlock(block.getLocation(), GRAV_MATERIAL, STABILITY_DATA[STABILITY_MIN]);
			return;
		} 
		
		// Set block stability metadata
		block.setData(STABILITY_DATA[stability]);
	}