コード例 #1
0
ファイル: ChunkFixture.cs プロジェクト: andywhite37/NCraft
 public void AssertSkyLight(SkyLight sl)
 {
     Assert.IsNotNull(sl);
     // 4-bit words unpacked into bytes
     Assert.AreEqual(32768, sl.Length);
     Assert.AreEqual(32768, sl.Values.Length);
 }
コード例 #2
0
ファイル: Chunk.cs プロジェクト: andywhite37/NCraft
 public void LoadFromTag(CompoundTag tag)
 {
     Blocks = new Blocks(tag.GetByteArrayTag(Blocks.BLOCKS));
     Data = new Data(tag.GetByteArrayTag(Data.DATA));
     SkyLight = new SkyLight(tag.GetByteArrayTag(SkyLight.SKY_LIGHT));
     BlockLight = new BlockLight(tag.GetByteArrayTag(BlockLight.BLOCK_LIGHT));
     HeightMap = new HeightMap(tag.GetByteArrayTag(HeightMap.HEIGHT_MAP));
     Entities = new Entities(tag.GetListTag(Entities.ENTITIES));
     TileEntities = new TileEntities(tag.GetListTag(TileEntities.TILE_ENTITIES));
     LastUpdate = tag.GetLong(LAST_UPDATE);
     XPos = tag.GetInt(X_POS);
     ZPos = tag.GetInt(Z_POS);
     TerrainPopulated = tag.GetByte(TERRAIN_POPULATED);
 }