mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-06 15:56:14 +00:00
feature addon registry configuration
This commit is contained in:
@@ -118,12 +118,6 @@ public class ConfigPackImpl implements ConfigPack {
|
||||
private final Map<Type, Pair<OpenRegistry<?>, CheckedRegistry<?>>> registryMap = new HashMap<>();
|
||||
|
||||
private final ConfigTypeRegistry configTypeRegistry;
|
||||
|
||||
private final Lazy<List<GenerationStage>> stages = Lazy.lazy(() -> template
|
||||
.getStages()
|
||||
.stream()
|
||||
.map(stage -> stage.newInstance(this))
|
||||
.collect(Collectors.toList()));
|
||||
private final TreeMap<Integer, List<Pair<String, ConfigType<?, ?>>>> configTypes = new TreeMap<>();
|
||||
|
||||
public ConfigPackImpl(File folder, Platform platform) throws ConfigException {
|
||||
@@ -352,7 +346,7 @@ public class ConfigPackImpl implements ConfigPack {
|
||||
|
||||
@Override
|
||||
public List<GenerationStage> getStages() {
|
||||
return stages.value();
|
||||
return template.getStages();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.api.config.meta.Meta;
|
||||
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
||||
import com.dfsek.terra.api.world.chunk.generation.util.provider.ChunkGeneratorProvider;
|
||||
import com.dfsek.terra.api.world.chunk.generation.util.provider.GenerationStageProvider;
|
||||
|
||||
@@ -76,7 +77,7 @@ public class ConfigPackTemplate implements ConfigTemplate {
|
||||
private @Meta boolean disableSaplings = false;
|
||||
|
||||
@Value("stages")
|
||||
private @Meta List<@Meta GenerationStageProvider> stages;
|
||||
private @Meta List<@Meta GenerationStage> stages;
|
||||
|
||||
@Value("version")
|
||||
@Default
|
||||
@@ -149,7 +150,7 @@ public class ConfigPackTemplate implements ConfigTemplate {
|
||||
return generatorProvider;
|
||||
}
|
||||
|
||||
public List<GenerationStageProvider> getStages() {
|
||||
public List<GenerationStage> getStages() {
|
||||
return stages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user