2011-04-06 04:43:54 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
2011-04-06 21:20:35 +00:00
|
|
|
|
namespace Substrate
|
2011-04-06 04:43:54 +00:00
|
|
|
|
{
|
|
|
|
|
|
2011-05-13 03:09:57 +00:00
|
|
|
|
/*public interface IChunk : IBoundedBlockContainer, IAlphaBlockContainer, IEntityContainer
|
2011-04-06 04:43:54 +00:00
|
|
|
|
{
|
|
|
|
|
int X { get; }
|
|
|
|
|
int Z { get; }
|
|
|
|
|
|
|
|
|
|
bool IsTerrainPopulated { get; set; }
|
|
|
|
|
|
|
|
|
|
bool Save (Stream outStream);
|
|
|
|
|
|
|
|
|
|
int CountBlockID (int id);
|
|
|
|
|
int CountBlockData (int id, int data);
|
|
|
|
|
|
2011-04-06 23:54:41 +00:00
|
|
|
|
int CountEntities ();
|
|
|
|
|
|
2011-04-06 04:43:54 +00:00
|
|
|
|
int GetHeight (int lx, int lz);
|
2011-05-13 03:09:57 +00:00
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
public interface IChunk
|
|
|
|
|
{
|
|
|
|
|
int X { get; }
|
|
|
|
|
int Z { get; }
|
|
|
|
|
|
|
|
|
|
AlphaBlockCollection Blocks { get; }
|
|
|
|
|
EntityCollection Entities { get; }
|
|
|
|
|
|
|
|
|
|
bool IsTerrainPopulated { get; set; }
|
|
|
|
|
|
|
|
|
|
bool Save (Stream outStream);
|
2011-04-06 04:43:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2011-05-13 03:09:57 +00:00
|
|
|
|
/*public interface IChunkCache
|
2011-04-06 04:43:54 +00:00
|
|
|
|
{
|
|
|
|
|
bool MarkChunkDirty (ChunkRef chunk);
|
|
|
|
|
bool MarkChunkClean (ChunkRef chunk);
|
2011-05-13 03:09:57 +00:00
|
|
|
|
}*/
|
2011-04-06 04:43:54 +00:00
|
|
|
|
|
|
|
|
|
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);
|
2011-04-09 04:52:43 +00:00
|
|
|
|
ChunkRef CreateChunk (int cx, int cz);
|
2011-04-06 04:43:54 +00:00
|
|
|
|
|
|
|
|
|
bool ChunkExists (int cx, int cz);
|
|
|
|
|
|
|
|
|
|
bool DeleteChunk (int cx, int cz);
|
|
|
|
|
|
|
|
|
|
int Save ();
|
|
|
|
|
bool SaveChunk (Chunk chunk);
|
|
|
|
|
}
|
2011-04-07 08:04:53 +00:00
|
|
|
|
|
2011-04-08 20:52:28 +00:00
|
|
|
|
public interface IChunkManager : IChunkContainer, IEnumerable<ChunkRef>
|
2011-04-07 08:04:53 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2011-04-06 04:43:54 +00:00
|
|
|
|
}
|