rename main parameters/fields to platform

This commit is contained in:
dfsek
2021-09-26 13:22:45 -07:00
parent 8f51707505
commit 4945a3bbfa
117 changed files with 535 additions and 516 deletions
@@ -31,14 +31,14 @@ public class DistributorAddon extends TerraAddon {
public static final TypeKey<Supplier<ObjectTemplate<Distributor>>> DISTRIBUTOR_TOKEN = new TypeKey<>() {
};
@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 -> {
CheckedRegistry<Supplier<ObjectTemplate<Distributor>>> distributorRegistry = event.getPack().getOrCreateRegistry(
DISTRIBUTOR_TOKEN);
distributorRegistry.register("NOISE", NoiseDistributorTemplate::new);
@@ -51,6 +51,6 @@ public class DistributorAddon extends TerraAddon {
event.getPack()
.applyLoader(Point.class, PointTemplate::new);
})
.failThrough();
.failThrough();
}
}