Exemplo n.º 1
0
        /// <summary>
        ///     Changes a given block to a block of a different type
        /// </summary>
        public void ModifyBlock(int x, int y, int z, BlockData blockData)
        {
            BlockData thisBlock = this[x, y, z];

            // Do nothing if there's no change
            if (blockData.CompareTo(thisBlock) == 0)
            {
                return;
            }

            // Meta data must be different as well
            // TODO: Not good. When trying to change an undamaged block into a different
            // undamaged block the following condition would be hit.
            //if (blockData.GetMeta()==thisBlock.GetMeta())
            //return;

            QueueSetBlock(this, x, y, z, blockData);
        }