public WorldGenSpawnConditions Clone() { return(new WorldGenSpawnConditions() { Group = Group, MinLightLevel = MinLightLevel, MaxLightLevel = MaxLightLevel, LightLevelType = LightLevelType, HerdSize = HerdSize?.Clone(), Companions = Companions?.Clone() as AssetLocation[], InsideBlockCodes = InsideBlockCodes?.Clone() as AssetLocation[], RequireSolidGround = RequireSolidGround, TryOnlySurface = TryOnlySurface, MinTemp = MinTemp, MaxTemp = MaxTemp, MinRain = MinRain, MaxRain = MaxRain, ClimateValueMode = ClimateValueMode, MinForest = MinForest, MaxForest = MaxForest, MinShrubs = MinShrubs, MaxShrubs = MaxShrubs, MinForestOrShrubs = MinForestOrShrubs, TriesPerChunk = TriesPerChunk?.Clone() }); }
/// <summary> /// Creates a deep copy of this set of spawn conditions. /// </summary> /// <returns></returns> public RuntimeSpawnConditions Clone() { return(new RuntimeSpawnConditions() { Group = Group, MinLightLevel = MinLightLevel, MaxLightLevel = MaxLightLevel, LightLevelType = LightLevelType, HerdSize = HerdSize?.Clone(), Companions = Companions?.Clone() as AssetLocation[], InsideBlockCodes = InsideBlockCodes?.Clone() as AssetLocation[], RequireSolidGround = RequireSolidGround, TryOnlySurface = TryOnlySurface, MinTemp = MinTemp, MaxTemp = MaxTemp, MinRain = MinRain, MaxRain = MaxRain, MinForest = MinForest, MaxForest = MaxForest, MinShrubs = MinShrubs, MaxShrubs = MaxShrubs, ClimateValueMode = ClimateValueMode, MinForestOrShrubs = MinForestOrShrubs, Chance = Chance, MaxQuantity = MaxQuantity, MinDistanceToPlayer = MinDistanceToPlayer }); }