// Path: src/main/java/net/boatcake/MyWorldGen/utils/SchematicFilenameFilter.java
// public class SchematicFilenameFilter implements FilenameFilter {
// 	@Override
// 	public boolean accept(File dir, String name) {
// 		return name.toLowerCase().endsWith(".schematic");
// 	}
// }


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import org.apache.logging.log4j.Level;
import net.boatcake.MyWorldGen.utils.SchematicFilenameFilter;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.util.Rotation;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.fml.common.IWorldGenerator;
package net.boatcake.MyWorldGen;




public class WorldGenerator implements IWorldGenerator {
	private List<Schematic> worldgenFolderSchemList;
	public List<Schematic> resourcePackSchemList;

	// Dumb lock to prevent stack overflow when structures cause chunks to
	// generate
	// TODO: Ideally, structures should not ever cause chunks to generate,
	// instead waiting until all required chunks are loaded to check for a
	// valid location. However, that's non-trivial, and would probably require
	// a chunk load handler (though I'd need that for retro-gen anyway)
	private int currentlyGenerating;
	private static int GENERATING_STACK_LIMIT = 5;

	public WorldGenerator() {
		worldgenFolderSchemList = new ArrayList<Schematic>();
		resourcePackSchemList = new ArrayList<Schematic>();
		currentlyGenerating = 0;
	}

	public void addSchematicsFromDirectory(File schemDirectory) {
// Path: src/main/java/net/boatcake/MyWorldGen/utils/SchematicFilenameFilter.java
// public class SchematicFilenameFilter implements FilenameFilter {
// 	@Override
// 	public boolean accept(File dir, String name) {
// 		return name.toLowerCase().endsWith(".schematic");
// 	}
// }


// Path: src/main/java/net/boatcake/MyWorldGen/WorldGenerator.java
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import org.apache.logging.log4j.Level;
import net.boatcake.MyWorldGen.utils.SchematicFilenameFilter;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.util.Rotation;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.fml.common.IWorldGenerator;

package net.boatcake.MyWorldGen;




public class WorldGenerator implements IWorldGenerator {
	private List<Schematic> worldgenFolderSchemList;
	public List<Schematic> resourcePackSchemList;

	// Dumb lock to prevent stack overflow when structures cause chunks to
	// generate
	// TODO: Ideally, structures should not ever cause chunks to generate,
	// instead waiting until all required chunks are loaded to check for a
	// valid location. However, that's non-trivial, and would probably require
	// a chunk load handler (though I'd need that for retro-gen anyway)
	private int currentlyGenerating;
	private static int GENERATING_STACK_LIMIT = 5;

	public WorldGenerator() {
		worldgenFolderSchemList = new ArrayList<Schematic>();
		resourcePackSchemList = new ArrayList<Schematic>();
		currentlyGenerating = 0;
	}

	public void addSchematicsFromDirectory(File schemDirectory) {
		File[] schemFiles = schemDirectory.listFiles(new SchematicFilenameFilter());