BlockPopulator -> GenerationStage

This commit is contained in:
dfsek
2021-07-08 09:56:19 -07:00
parent 719ea83bcd
commit 8dcd50d3fb
18 changed files with 33 additions and 33 deletions

View File

@@ -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-ore-config")
@@ -26,6 +26,6 @@ public class OreAddon extends TerraAddon implements EventListener {
public void onPackLoad(ConfigPackPreLoadEvent event) throws DuplicateEntryException {
event.getPack().registerConfigType(new OreConfigType(event.getPack()), "ORE", 1);
event.getPack().getOrCreateRegistry(BlockPopulatorProvider.class).register("ORE", pack -> new OrePopulator(main));
event.getPack().getOrCreateRegistry(GenerationStageProvider.class).register("ORE", pack -> new OrePopulator(main));
}
}

View File

@@ -7,12 +7,12 @@ 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.biome.TerraBiome;
import com.dfsek.terra.api.world.generator.TerraBlockPopulator;
import com.dfsek.terra.api.world.generator.TerraGenerationStage;
import org.jetbrains.annotations.NotNull;
import java.util.Random;
public class OrePopulator implements TerraBlockPopulator {
public class OrePopulator implements TerraGenerationStage {
private final TerraPlugin main;
public OrePopulator(TerraPlugin main) {