From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Thu, 1 Jul 2021 19:25:05 -0500
Subject: [PATCH] Structure seed options


diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index f71cc1f5e5d594e82a4e6132d438bae74b9370a7..77948e19dd99b6f30bf294c9d5308228a271929b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -389,6 +389,17 @@ public abstract class ChunkGenerator {
                     case "village":
                         seed = conf.villageSeed;
                         break;
+                    // Purpur start
+                    case "stronghold":
+                        seed = net.pl3x.purpur.PurpurConfig.seedStructureStronghold;
+                        break;
+                    case "mineshaft":
+                        seed = net.pl3x.purpur.PurpurConfig.seedStructureMineshaft;
+                        break;
+                    case "buried_treasure":
+                        seed = net.pl3x.purpur.PurpurConfig.seedStructureBuriedTreasure;
+                        break;
+                    // Purpur end
                 }
 
                 updated.put(entry.getKey(), new StructureFeatureConfiguration(feature.spacing(), feature.separation(), seed));
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 2def6767b2ee97d9c662b93796ed97bcfd3bbebc..97dba790a02fe54da4278c7e913dbbcf8a25d126 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -247,6 +247,9 @@ public class PurpurConfig {
     public static int seedFeatureVegetationPatch = -1;
     public static int seedFeatureWaterloggedVegetationPatch = -1;
     public static int seedFeatureWeepingVines = -1;
+    public static int seedStructureBuriedTreasure = -1;
+    public static int seedStructureMineshaft = -1;
+    public static int seedStructureStronghold = -1;
     private static void seedSettings() {
         if (version < 14) {
             int oldValue = getInt("settings.seed.dungeon", -1);
@@ -312,6 +315,9 @@ public class PurpurConfig {
         seedFeatureVegetationPatch = getInt("settings.seed.feature.vegetation_patch", seedFeatureVegetationPatch);
         seedFeatureWaterloggedVegetationPatch = getInt("settings.seed.feature.waterlogged_vegetation_patch", seedFeatureWaterloggedVegetationPatch);
         seedFeatureWeepingVines = getInt("settings.seed.feature.weeping_vines", seedFeatureWeepingVines);
+        seedStructureBuriedTreasure = getInt("settings.seed.structure.buried_treasure", seedStructureBuriedTreasure);
+        seedStructureMineshaft = getInt("settings.seed.structure.mineshaft", seedStructureMineshaft);
+        seedStructureStronghold = getInt("settings.seed.structure.stronghold", seedStructureStronghold);
         // hide these from timings report
         if (!TimingsManager.hiddenConfigs.contains("settings.seed")) TimingsManager.hiddenConfigs.add("settings.seed");
     }
