2023-10-28 21:40:29 -07:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import "git.nicholasnovak.io/nnovak/spatial-db/world"
|
|
|
|
|
|
|
|
type StorageServer interface {
|
2023-11-13 16:22:46 -08:00
|
|
|
// Individual operations
|
|
|
|
SetStorageRoot(path string)
|
|
|
|
|
2023-12-05 14:38:19 -08:00
|
|
|
// Block-level interactions
|
2023-10-28 21:40:29 -07:00
|
|
|
ChangeBlock(targetState world.BlockID, world_position world.BlockPos) error
|
2023-12-05 14:38:19 -08:00
|
|
|
ReadBlockAt(pos world.BlockPos) (world.BlockID, error)
|
|
|
|
|
|
|
|
// Region-level interactions
|
2023-10-28 21:40:29 -07:00
|
|
|
ChangeBlockRange(targetState world.BlockID, start, end world.BlockPos) error
|
|
|
|
|
|
|
|
// Network-level operations
|
|
|
|
ReadChunkAt(pos world.ChunkPos) error
|
|
|
|
}
|