Ejemplo n.º 1
0
 /// <summary>
 /// Returns a copy of the given block location offset by the chunk location
 /// </summary>
 /// <param name="block"></param>
 /// <param name="chunk"></param>
 /// <returns></returns>
 public static BlockLocation GetBlockOffsetByChunk(BlockLocation block, ChunkLocation chunk)
 {
     TempB.Set(
         GetBlockXZOffsetByChunk(block.X, chunk.X),
         block.Y,
         GetBlockXZOffsetByChunk(block.Z, chunk.Z));
     return(TempB);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns a blank block location (starting at 0,0) offset by a given chunk location
 /// </summary>
 /// <param name="chunkLocation"></param>
 /// <returns></returns>
 public static BlockLocation GetBlankChunkOffset(ChunkLocation chunkLocation)
 {
     TempB.Set(
         chunkLocation.X * ChunkWidth,
         0,
         chunkLocation.Z * ChunkWidth);
     return(TempB);
 }