mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-24 09:06:39 +00:00
feature addon registry configuration
This commit is contained in:
@@ -23,12 +23,15 @@ public class ConfiguredFeature implements Feature {
|
||||
private final Distributor distributor;
|
||||
private final Locator locator;
|
||||
|
||||
private final String id;
|
||||
|
||||
public ConfiguredFeature(ProbabilityCollection<Structure> structures, NoiseSampler structureSelector, Distributor distributor,
|
||||
Locator locator) {
|
||||
Locator locator, String id) {
|
||||
this.structures = structures;
|
||||
this.structureSelector = structureSelector;
|
||||
this.distributor = distributor;
|
||||
this.locator = locator;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,4 +48,9 @@ public class ConfiguredFeature implements Feature {
|
||||
public Locator getLocator() {
|
||||
return locator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.dfsek.terra.api.structure.feature.Feature;
|
||||
public class FeatureFactory implements ConfigFactory<FeatureTemplate, Feature> {
|
||||
@Override
|
||||
public Feature build(FeatureTemplate config, Platform platform) throws LoadException {
|
||||
return new ConfiguredFeature(config.getStructures(), config.getStructureNoise(), config.getDistributor(), config.getLocator());
|
||||
return new ConfiguredFeature(config.getStructures(), config.getStructureNoise(), config.getDistributor(), config.getLocator(),
|
||||
config.getID());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user