Files
Purpur/patches/server/0199-Structure-seed-options.patch
Krakenied fff2015d52 Updated Upstream (Paper) (#1174)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@7b3b593 [ci skip] Update checkout action in workflow (#8510)
PaperMC/Paper@36869cc Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099)
PaperMC/Paper@2432233 Add allow server listing & text filtering client options (#7595)
PaperMC/Paper@954e6f0 Fix a bunch more forceDrops for dropping items (#8095)
PaperMC/Paper@32d95e9 Track projectile source for fireworks from dispensers (#8044)
PaperMC/Paper@0249750 Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511)
PaperMC/Paper@8acb05d Make CommandSyntaxException implement ComponentMessageThrowable (#8513)
PaperMC/Paper@c264018 [ci skip] Undo modification to removed patches in latest commit (#8512)
PaperMC/Paper@304ab35 [ci skip] Remove old todo file
PaperMC/Paper@8a4b752 Fix wrong descriptor in ASMEventExecutorGenerator (#8506)
PaperMC/Paper@b743144 Fix MC-147659 (#8423)
PaperMC/Paper@aaf5e39 Deprecate unused VehicleEntityCollisionEvent methods (#8498)
2022-10-29 22:47:43 -07:00

35 lines
1.8 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/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index dfdbbb133b427cf005e76a28f85b041ee930a98c..637a8ff846f0a90bee9789937ff21700af48a79b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -217,6 +217,23 @@ public class PurpurConfig {
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
}
+ public static int seedStructureBuriedTreasure = -1;
+ public static int seedStructureMineshaft = -1;
+ private static void seedSettings() {
+ seedStructureBuriedTreasure = getInt("settings.seed.structure.buried_treasure", seedStructureBuriedTreasure);
+ seedStructureMineshaft = getInt("settings.seed.structure.mineshaft", seedStructureMineshaft);
+ if (version < 26) {
+ int stronghold = getInt("settings.seed.structure.stronghold", -1);
+ set("settings.seed.structure.stronghold", null);
+ if (stronghold != -1) {
+ org.spigotmc.SpigotConfig.config.set("world-settings.default.seed-stronghold", stronghold);
+ org.spigotmc.SpigotConfig.save();
+ }
+ }
+ // hide these from timings report
+ if (!TimingsManager.hiddenConfigs.contains("settings.seed")) TimingsManager.hiddenConfigs.add("settings.seed");
+ }
+
public static String serverModName = "Purpur";
private static void serverModName() {
serverModName = getString("settings.server-mod-name", serverModName);