@Override
    public void populate(final World world, final Random random, final Chunk source) {
        Material liquidType = null;
        for (int x = 0; x < 16; x++) {
            for (int z = 0; z < 16; z++) {
                Block block = source.getBlock(x, 5, z);
                if (block.getType() == Material.AIR) {
                    // We only want to calculate liquid type if we need to use it
                    if (liquidType == null) {
                        liquidType = getMaterial(world, source, random);
                        if (liquidType == Material.STATIONARY_LAVA) {
                            liquidType = Material.LAVA;
                        } else if (liquidType == Material.STATIONARY_WATER) {
                            liquidType = Material.WATER;
                        }
                    }
                    while (block.getType() == Material.AIR || block.getType() == Material.STATIONARY_LAVA ||
                            block.getType() == Material.STATIONARY_WATER) {
                        block.setType(liquidType);
                        block = block.getRelative(BlockFace.DOWN);
                    }
                }
            }
        }
    }