mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Configurable structure seed settings
This commit is contained in:
52
patches/server/0227-Structure-seed-options.patch
Normal file
52
patches/server/0227-Structure-seed-options.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
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 6cd66a4edbe2010d2a34506baf1ba6fe3de38bb9..f3e67330c01f6a867ccd4e024a6695d90bc2988c 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 8b1372d5d5eb4477f60891233b0f0a7b729bcc47..09db8d27331a4db0e28e220720d80b3f94050a7f 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
@@ -219,6 +219,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);
|
||||||
|
@@ -284,6 +287,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");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user