Example #1
0
 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()
     });
 }
Example #2
0
 /// <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
     });
 }