remove SeededTerraBiome

This commit is contained in:
dfsek
2021-07-19 21:35:53 -07:00
parent 458fc422de
commit 03e4636ef9
19 changed files with 45 additions and 82 deletions

View File

@@ -2,15 +2,11 @@ package com.dfsek.terra.config.pack;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.config.WorldConfig;
import com.dfsek.terra.api.registry.OpenRegistry;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.util.seeded.SeededTerraBiome;
import com.dfsek.terra.api.world.TerraWorld;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
import com.dfsek.terra.api.world.generator.SamplerCache;
import com.dfsek.terra.registry.LockedRegistryImpl;
import com.dfsek.terra.registry.OpenRegistryImpl;
import com.dfsek.terra.world.SamplerCacheImpl;
import java.lang.reflect.Type;
@@ -34,10 +30,6 @@ public class WorldConfigImpl implements WorldConfig {
pack.getRegistryMap().forEach((clazz, pair) -> registryMap.put(clazz, new LockedRegistryImpl<>(pair.getLeft())));
OpenRegistry<TerraBiome> biomeOpenRegistry = new OpenRegistryImpl<>();
pack.getCheckedRegistry(SeededTerraBiome.class).forEach((id, biome) -> biomeOpenRegistry.register(id, biome.build(world.getWorld().getSeed())));
registryMap.put(TerraBiome.class, new LockedRegistryImpl<>(biomeOpenRegistry));
this.provider = pack.getBiomeProviderBuilder().build(world.getWorld().getSeed());
}