mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206) d6c81c8 Don't apply cramming damage to players (#5903) 12942dc Add rate options and timings for sensors and behaviors (#6027) fc47872 Use mapped names for sensor and behavior timings/config (#6228) c75a837 Don't expose ASM in API (#6229) c225bf9 Fix book title and author being improperly serialized as components (#6190) f25facb Update email & name (DenWav) 44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
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 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 07e5bb1b148376b3962a983b3d192bd838e04e02..808d763e767fd4f727c5f0a735c3e5d4ac17a47e 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");
|
|
}
|