Ejemplo n.º 1
0
        /// <summary>
        /// Inserts/replaces a new chunk on a specified location.
        /// </summary>
        /// <param name="location">The region location of the chunk.</param>
        /// <param name="chunk">The chunk to be added.</param>
        public void InsertChunk(MCPoint location, NBTFile chunk)
        {
            int offset = location.X + (location.Y * 32);

            chunks[offset] = chunk;

            chunkChanged[offset] = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets a chunk from this region.
 /// </summary>
 /// <param name="point">The location of the chunk.</param>
 /// <returns>An NBT file that has the </returns>
 public NBTFile this[MCPoint point]
 {
     get
     {
         return this.chunks[point.X + point.Y * 32];
     }
     set
     {
         InsertChunk(point, value);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Removes a chunk on a specified location.
        /// </summary>
        /// <param name="location">The region location of the chunk to be removed.</param>
        public void RemoveChunk(MCPoint location)
        {
            int offset = location.X + (location.Y * 32);

            chunks[offset] = null;

            if (chunks[offset] != null)
                chunkChanged[offset] = true;
        }