示例#1
0
        /// <summary>
        /// Called whenever dimension is loading provided that the world tag compound does not contain saved the dimension with this id.
        /// This used to initialize dimension in the first time.
        /// </summary>
        /// <returns>A new dimension</returns>
        public virtual TDimension InitializeTag()
        {
            var tagCompound = GetTagCompound();

            SavedDimensionsTag.Add(Id, tagCompound);
            var dimension = TagIO.Deserialize <TDimension>(tagCompound);

            return(dimension);
        }
示例#2
0
        public override TDimension Load()
        {
            var tagCompound = TagIO.FromFile(FileResourcePath);

            return(TagIO.Deserialize <TDimension>(tagCompound));
        }