image to biome stuff

This commit is contained in:
dfsek
2021-01-18 23:56:46 -07:00
parent 4b21fcd80a
commit 9e830abb90
16 changed files with 392 additions and 100 deletions

View File

@@ -21,7 +21,7 @@ import com.dfsek.terra.config.loaders.ProbabilityCollectionLoader;
import com.dfsek.terra.config.loaders.config.biome.BiomeProviderBuilderLoader;
import com.dfsek.terra.config.templates.AbstractableTemplate;
import com.dfsek.terra.debug.Debug;
import com.dfsek.terra.registry.TerraRegistry;
import com.dfsek.terra.registry.BiomeRegistry;
import org.junit.jupiter.api.Test;
import javax.swing.*;
@@ -48,13 +48,12 @@ public class DistributionTest {
AbstractConfigLoader loader = new AbstractConfigLoader();
TerraRegistry<TestBiome> biomeRegistry = new TerraRegistry<TestBiome>() {
};
BiomeRegistry biomeRegistry = new BiomeRegistry();
folderLoader.open("biomes", ".yml").then(inputStreams -> ConfigPack.buildAll((template, main) -> template, biomeRegistry, loader.load(inputStreams, TestBiome::new), null));
BiomeProviderTemplate template = new BiomeProviderTemplate();
ConfigLoader pipeLoader = new ConfigLoader()
.registerLoader(BiomeProvider.BiomeProviderBuilder.class, new BiomeProviderBuilderLoader(null))
.registerLoader(BiomeProvider.BiomeProviderBuilder.class, new BiomeProviderBuilderLoader(null, biomeRegistry, folderLoader))
.registerLoader(ProbabilityCollection.class, new ProbabilityCollectionLoader())
.registerLoader(TerraBiome.class, biomeRegistry);
new GenericLoaders(null).register(pipeLoader);