mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
53 lines
3.2 KiB
Diff
53 lines
3.2 KiB
Diff
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 6a1cb38de5733e384546984a0eadd4bab53c0122..3db79ce2ee0e72fe521beaaf6373a5ff0820be69 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
@@ -424,6 +424,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 820ef4ade5a38ca158ee5ec841abbdde80fc1399..a2e3594c92f3b16fe70d327616040a4afac77765 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");
|
|
}
|