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

@@ -17,17 +17,17 @@ import com.dfsek.terra.api.inject.annotations.Inject;
@Version("0.1.0")
public class FloraAddon extends TerraAddon {
@Inject
private Platform main;
private Platform platform;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
event.getPack().registerConfigType(new FloraConfigType(), "FLORA", 2);
event.getPack().applyLoader(BlockLayer.class, BlockLayerTemplate::new);
})
.failThrough();
.failThrough();
}
}
@@ -22,7 +22,7 @@ public class FloraConfigType implements ConfigType<FloraTemplate, Structure> {
}
@Override
public FloraTemplate getTemplate(ConfigPack pack, Platform main) {
public FloraTemplate getTemplate(ConfigPack pack, Platform platform) {
return new FloraTemplate();
}
@@ -8,7 +8,7 @@ import com.dfsek.terra.api.structure.Structure;
public class FloraFactory implements ConfigFactory<FloraTemplate, Structure> {
@Override
public TerraFlora build(FloraTemplate config, Platform main) {
public TerraFlora build(FloraTemplate config, Platform platform) {
return new TerraFlora(config.getLayers(), config.doPhysics(), config.isCeiling(),
config.getRotatable(),
config.getNoiseDistribution(), config.getID());