mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 21:30:08 +00:00
Reformat code
This commit is contained in:
@@ -9,7 +9,6 @@ package com.dfsek.terra.api.event.events.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.Configuration;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.api.structure;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.dfsek.terra.api.util.Rotation;
|
||||
import com.dfsek.terra.api.util.vector.Vector3Int;
|
||||
import com.dfsek.terra.api.world.WritableWorld;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public interface Structure {
|
||||
boolean generate(Vector3Int location, WritableWorld world, Random random, Rotation rotation);
|
||||
|
||||
@@ -5,19 +5,18 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.function.Function.*;
|
||||
import static java.util.function.Function.identity;
|
||||
|
||||
|
||||
public class FileUtil {
|
||||
public static Map<String, Path> filesWithExtension(Path start, String... extensions) throws IOException {
|
||||
if(Files.notExists(start) || !Files.isDirectory(start)) return Collections.emptyMap();
|
||||
try (Stream<Path> paths = Files.walk(start)) {
|
||||
try(Stream<Path> paths = Files.walk(start)) {
|
||||
return paths
|
||||
.filter(Files::isRegularFile)
|
||||
.filter(p -> Arrays.stream(extensions).anyMatch(e -> p.getFileName().toString().endsWith(e)))
|
||||
|
||||
Reference in New Issue
Block a user