Пример #1
0
 public void SetBlock(int x, int y, int z, Block block)
 {
     if (InRange(x) && InRange(y) && InRange(z))
     {
         Blocks[x, y, z] = block;
     }
     else
     {
         Planet.SetBlock(Pos.x + x, Pos.y + y, Pos.z + z, block);
     }
 }
Пример #2
0
        public void SetBlock(int x, int y, int z, Block block)
        {
            Chunk chunk = GetChunk(x, y, z);

            if (chunk != null)
            {
                chunk.SetBlock(x - chunk.Pos.x, y - chunk.Pos.y, z - chunk.Pos.z, block);
                chunk.NeedsUpdate = true;
            }
        }