mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-24 00:56:38 +00:00
BlockPopulator -> GenerationStage
This commit is contained in:
@@ -9,7 +9,7 @@ import com.dfsek.terra.api.event.EventListener;
|
||||
import com.dfsek.terra.api.event.events.config.ConfigPackPreLoadEvent;
|
||||
import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
import com.dfsek.terra.api.registry.exception.DuplicateEntryException;
|
||||
import com.dfsek.terra.api.world.generator.BlockPopulatorProvider;
|
||||
import com.dfsek.terra.api.world.generator.GenerationStageProvider;
|
||||
|
||||
@Addon("core-flora-config")
|
||||
@Author("Terra")
|
||||
@@ -25,6 +25,6 @@ public class FloraAddon extends TerraAddon implements EventListener {
|
||||
|
||||
public void onPackLoad(ConfigPackPreLoadEvent event) throws DuplicateEntryException {
|
||||
event.getPack().registerConfigType(new FloraConfigType(event.getPack()), "FLORA", 2);
|
||||
event.getPack().getOrCreateRegistry(BlockPopulatorProvider.class).register("FLORA", pack -> new FloraPopulator(main));
|
||||
event.getPack().getOrCreateRegistry(GenerationStageProvider.class).register("FLORA", pack -> new FloraPopulator(main));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import com.dfsek.terra.api.profiler.ProfileFrame;
|
||||
import com.dfsek.terra.api.world.Chunk;
|
||||
import com.dfsek.terra.api.world.TerraWorld;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.api.world.generator.TerraBlockPopulator;
|
||||
import com.dfsek.terra.api.world.generator.TerraGenerationStage;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Populates Flora
|
||||
*/
|
||||
public class FloraPopulator implements TerraBlockPopulator {
|
||||
public class FloraPopulator implements TerraGenerationStage {
|
||||
private final TerraPlugin main;
|
||||
|
||||
public FloraPopulator(TerraPlugin main) {
|
||||
|
||||
Reference in New Issue
Block a user