private int stabilityOf(Block block) {
		if (!doesGravityEffect(block.getType())) {
			if (!SOLID_MATERIALS.contains(block.getType())) {
				return -1;
			} else {
				return MAX_STABILITY + 1;
			}
		}

		int stability;
		if (!stabilityCache.containsKey(block.getLocation())
				|| stabilityCache.get(block.getLocation()) < 0) {
			// Put in temporary unstable value to prevent infinite recursion in stability calculation
			Location loc = block.getLocation().clone(); // Original location may mutate
			stabilityCache.put(loc, 0);
			// Calculate stability
			stability = calculateStability(block);
			stabilityCache.put(loc, stability);
			//plugin.getLogger().info("Cached "+block+" stability = "+stability);
		} else {
			stability = stabilityCache.get(block.getLocation());
			//plugin.getLogger().info("Recall "+block+" stability = "+ stability);
		}
		
		return stability;
	}