rename main parameters/fields to platform

This commit is contained in:
dfsek committed 2021-09-26 13:22:45 -07:00
1 parent 8f51707505
commit 4945a3bbfa
117 files changed
+535 -516

No files matched your search

@@ -15,14 +15,14 @@ import com.dfsek.terra.api.inject.annotations.Inject;
@Author("Terra")
public class FeatureAddon extends TerraAddon {
@Inject
private Platform main;
private Platform platform;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> event.getPack().registerConfigType(new FeatureConfigType(), "FEATURE", 3))
.failThrough();
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> event.getPack().registerConfigType(new FeatureConfigType(), "FEATURE", 3))
.failThrough();
}
}
@@ -23,7 +23,7 @@ public class FeatureConfigType implements ConfigType<FeatureTemplate, Feature> {
}
@Override
public FeatureTemplate getTemplate(ConfigPack pack, Platform main) {
public FeatureTemplate getTemplate(ConfigPack pack, Platform platform) {
return new FeatureTemplate();
}
@@ -9,7 +9,7 @@ import com.dfsek.terra.api.structure.feature.Feature;
public class FeatureFactory implements ConfigFactory<FeatureTemplate, Feature> {
@Override
public Feature build(FeatureTemplate config, Platform main) throws LoadException {
public Feature build(FeatureTemplate config, Platform platform) throws LoadException {
return new ConfiguredFeature(config.getStructures(), config.getStructureNoise(), config.getDistributor(), config.getLocator());
}
}