mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-12 18:56:04 +00:00
pull more methods to WorldAccess
This commit is contained in:
@@ -22,10 +22,4 @@ public interface World extends WorldAccess {
|
||||
default Chunk getChunkAt(Vector3 location) {
|
||||
return getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4);
|
||||
}
|
||||
|
||||
ChunkGenerator getGenerator();
|
||||
|
||||
BiomeProvider getBiomeProvider();
|
||||
|
||||
WorldConfig getConfig();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,12 @@ package com.dfsek.terra.api.world.access;
|
||||
import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.block.entity.BlockEntity;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.config.WorldConfig;
|
||||
import com.dfsek.terra.api.entity.Entity;
|
||||
import com.dfsek.terra.api.entity.EntityType;
|
||||
import com.dfsek.terra.api.util.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||
|
||||
|
||||
public interface WorldAccess extends Handle {
|
||||
@@ -46,4 +49,10 @@ public interface WorldAccess extends Handle {
|
||||
}
|
||||
|
||||
Entity spawnEntity(double x, double y, double z, EntityType entityType);
|
||||
|
||||
ChunkGenerator getGenerator();
|
||||
|
||||
BiomeProvider getBiomeProvider();
|
||||
|
||||
WorldConfig getConfig();
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ package com.dfsek.terra.api.world.chunk.generation;
|
||||
|
||||
import com.dfsek.terra.api.util.vector.integer.Vector3Int;
|
||||
|
||||
import com.dfsek.terra.api.world.access.WorldAccess;
|
||||
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.dfsek.terra.api.Platform;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
@@ -26,7 +26,8 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
|
||||
|
||||
public interface ChunkGenerator {
|
||||
void generateChunkData(@NotNull World world, Random random, int x, int z, ProtoChunk original);
|
||||
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WorldAccess world,
|
||||
int chunkZ, int chunkX);
|
||||
Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth);
|
||||
|
||||
ConfigPack getConfigPack();
|
||||
|
||||
Reference in New Issue
Block a user