private int calculateStability(Block block) {	
		// This block will get the highest stability value of the following options
		// 	1. The same stability value as the block beneath
		//	2. The value of the most stable adjacent block minus this block's weight
		
		int weight = 0;
		for (GravityMaterial gm : GRAVITY_MATERIALS) {
			if (gm.containsMaterial(block.getType())) {
				weight = gm.weight();
				break;
			}
		}
		
		int stability = stabilityOf(block.getRelative(BlockFace.DOWN));
		
		stability = Math.max(stability, stabilityOf(block.getRelative(BlockFace.NORTH)) - weight);
		stability = Math.max(stability, stabilityOf(block.getRelative(BlockFace.SOUTH)) - weight);
		stability = Math.max(stability, stabilityOf(block.getRelative(BlockFace.EAST)) - weight);
		stability = Math.max(stability, stabilityOf(block.getRelative(BlockFace.WEST)) - weight);
		stability = Math.max(stability, stabilityOf(block.getRelative(BlockFace.UP)) - weight);
		
		// Make sure stability >= 0 and <= MAX_STABILITY
		stability = Math.max(stability, 0);
		stability = Math.min(stability, MAX_STABILITY);
		
		//plugin.getLogger().info("Stability of "+block+" = "+stability);
		
		return stability;
	}