/// <summary>
 /// This constructor creates a new dimension.
 /// </summary>
 /// <param name="dimensionName"></param>
 /// <param name="chunks"></param>
 public Dimension(string dimensionName, ProtoArray <Chunk> chunks)
 {
     this.Manager       = new ChunkManager(this.ID, chunks);
     this.DimensionName = dimensionName;
     this.ID            = Guid.NewGuid();
     this.Items         = new ItemRegistry(World.AddDimension(this));
 }
Пример #2
0
 /// <summary>
 /// This constructor creates a new dimension.
 /// </summary>
 /// <param name="dimensionName"></param>
 /// <param name="chunks"></param>
 public Dimension(string dimensionName, ProtoArray <Chunk> chunks)
 {
     this.ChunkManage     = new ChunkManager(this.ID, chunks);
     this.DimensionName   = dimensionName;
     this.ID              = Guid.NewGuid();
     this.StructureManage = new StructureManager(this.ID);//Depends on the dimension ID to be initialized first.
     this.Items           = new ItemRegistry(World.AddDimension(this));
 }
Пример #3
0
        public Dimension(string dimensionName, ProtoArray <Chunk> chunks)
        {
            this.Manager       = new ChunkManager(this.ID, chunks);
            this.DimensionName = dimensionName;
            World.Storage.PrepareForDimension(this.ID);

            int dimensionID = World.AddDimension(this);

            //Anything that needs a dimensionID
        }
        /// <summary>
        /// This constructor is for creating a dimension identical to a dimension loaded from disk/network.
        /// </summary>
        /// <param name="dimensionName"></param>
        /// <param name="chunks"></param>
        /// <param name="id"></param>
        /// <param name="registry"></param>
        public Dimension(string dimensionName, ProtoArray <Chunk> chunks, Guid id, ItemRegistry registry)
        {
            this.ID            = id;
            this.Manager       = new ChunkManager(id, chunks);
            this.DimensionName = dimensionName;

            int dimensionID = World.AddDimension(this);

            //Anything that needs a dimensionID
            this.Items = registry;
        }