mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-14 11:46:06 +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-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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user