public I Get(int x, int z)
    {
        Vector3i    chunkPos = Chunk.ToChunkPosition(x, 0, z);
        Vector3i    localPos = Chunk.ToLocalPosition(x, 0, z);
        Chunk2D <I> chunk    = GetChunk(chunkPos.x, chunkPos.z);

        if (chunk != null)
        {
            return(chunk.Get(localPos.x, localPos.z));
        }
        return(defaultValue);
    }
コード例 #2
0
        private bool IsSunLight(Vector3i chunkPos, Vector3i localPos, int worldY)
        {
            Chunk2D <short> chunk = rays.GetChunk(chunkPos.x, chunkPos.z);

            return(chunk != null && chunk.Get(localPos.x, localPos.z) <= worldY);
        }