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-tree-config")
@Author("Terra")
@@ -25,6 +25,6 @@ public class TreeAddon extends TerraAddon implements EventListener {
public void onPackLoad(ConfigPackPreLoadEvent event) throws DuplicateEntryException {
event.getPack().registerConfigType(new TreeConfigType(event.getPack()), "TREE", 2);
event.getPack().getOrCreateRegistry(BlockPopulatorProvider.class).register("TREE", pack -> new TreePopulator(main));
event.getPack().getOrCreateRegistry(GenerationStageProvider.class).register("TREE", pack -> new TreePopulator(main));
}
}

View File

@@ -7,14 +7,14 @@ 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.generation.BiomeProvider;
import com.dfsek.terra.api.world.generator.TerraBlockPopulator;
import com.dfsek.terra.api.world.generator.TerraGenerationStage;
import net.jafama.FastMath;
import org.jetbrains.annotations.NotNull;
import java.util.Random;
public class TreePopulator implements TerraBlockPopulator {
public class TreePopulator implements TerraGenerationStage {
private final TerraPlugin main;
public TreePopulator(TerraPlugin main) {