NBTExplorer/Substrate/SubstrateCS/Source/ChunkInterface.cs

72 lines
1.6 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
2011-04-06 21:20:35 +00:00
namespace Substrate
{
/*public interface IChunk : IBoundedBlockContainer, IAlphaBlockContainer, IEntityContainer
{
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 CountEntities ();
int GetHeight (int lx, int lz);
}*/
public interface IChunk
{
int X { get; }
int Z { get; }
AlphaBlockCollection Blocks { get; }
EntityCollection Entities { get; }
bool IsTerrainPopulated { get; set; }
bool Save (Stream outStream);
}
/*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);
ChunkRef CreateChunk (int cx, int cz);
ChunkRef SetChunk (int cx, int cz, Chunk chunk);
bool ChunkExists (int cx, int cz);
bool DeleteChunk (int cx, int cz);
int Save ();
bool SaveChunk (Chunk chunk);
}
public interface IChunkManager : IChunkContainer, IEnumerable<ChunkRef>
{
}
}