forked from mirrors/NBTExplorer
48 lines
1 KiB
C#
48 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.IO;
|
|
|
|
namespace NBToolkit.Map
|
|
{
|
|
|
|
public interface IChunk : IBlockContainer
|
|
{
|
|
int X { get; }
|
|
int Z { get; }
|
|
|
|
bool IsTerrainPopulated { get; set; }
|
|
|
|
bool Save (Stream outStream);
|
|
|
|
int CountBlockID (int id);
|
|
int CountBlockData (int id, int data);
|
|
|
|
int GetHeight (int lx, int lz);
|
|
}
|
|
|
|
public interface IChunkCache
|
|
{
|
|
bool MarkChunkDirty (ChunkRef chunk);
|
|
bool MarkChunkClean (ChunkRef chunk);
|
|
}
|
|
|
|
public interface IChunkContainer
|
|
{
|
|
int ChunkGlobalX (int cx);
|
|
int ChunkGlobalZ (int cz);
|
|
|
|
int ChunkLocalX (int cx);
|
|
int ChunkLocalZ (int cz);
|
|
|
|
Chunk GetChunk (int cx, int cz);
|
|
ChunkRef GetChunkRef (int cx, int cz);
|
|
|
|
bool ChunkExists (int cx, int cz);
|
|
|
|
bool DeleteChunk (int cx, int cz);
|
|
|
|
int Save ();
|
|
bool SaveChunk (Chunk chunk);
|
|
}
|
|
}
|