forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-add config for stronghold seed patch
- Loading branch information
1 parent
490517d
commit 9da236f
Showing
19 changed files
with
47 additions
and
76 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
patches/removed/1.18.2/0851-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
patches/removed/1.18.2/0858-Add-config-for-stronghold-seed.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Jake Potrebic <[email protected]> | ||
Date: Thu, 13 Jan 2022 23:05:53 -0800 | ||
Subject: [PATCH] Add config for stronghold seed | ||
|
||
|
||
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 eb2f0bc997a6823c74f32ec01330ced39a14fdd0..56c41fd1c4aedd43d432e3cb3c4e790d0419c159 100644 | ||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java | ||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java | ||
@@ -223,7 +223,13 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource { | ||
int k = placement.spread(); | ||
Random random = new Random(); | ||
|
||
+ // Paper start | ||
+ if (strongholdSet.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS) && this.conf.strongholdSeed != null) { | ||
+ random.setSeed(this.conf.strongholdSeed); | ||
+ } else { | ||
+ // Paper end | ||
random.setSeed(this.ringPlacementSeed); | ||
+ } // Paper | ||
double d0 = random.nextDouble() * 3.141592653589793D * 2.0D; | ||
int l = 0; | ||
int i1 = 0; | ||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java | ||
index b498b027b127996976a394e9a86cfc90f8a8ed3b..31a447e6e156b7b244b2ac69a9c03c09c7ed388c 100644 | ||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java | ||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java | ||
@@ -364,6 +364,7 @@ public class SpigotWorldConfig | ||
public int mansionSeed; | ||
public int fossilSeed; | ||
public int portalSeed; | ||
+ public Long strongholdSeed; // Paper | ||
private void initWorldGenSeeds() | ||
{ | ||
this.villageSeed = this.getInt( "seed-village", 10387312 ); | ||
@@ -381,6 +382,10 @@ public class SpigotWorldConfig | ||
this.mansionSeed = this.getInt( "seed-mansion", 10387319 ); | ||
this.fossilSeed = this.getInt( "seed-fossil", 14357921 ); | ||
this.portalSeed = this.getInt( "seed-portal", 34222645 ); | ||
+ // Paper start | ||
+ final String strongholdSeedString = this.getString("seed-stronghold", "default"); | ||
+ this.strongholdSeed = org.apache.commons.lang3.math.NumberUtils.isParsable(strongholdSeedString) ? Long.parseLong(strongholdSeedString) : null; | ||
+ // Paper end | ||
this.log( "Custom Map Seeds: Village: " + this.villageSeed + " Desert: " + this.desertSeed + " Igloo: " + this.iglooSeed + " Jungle: " + this.jungleSeed + " Swamp: " + this.swampSeed + " Monument: " + this.monumentSeed | ||
+ " Ocean: " + this.oceanSeed + " Shipwreck: " + this.shipwreckSeed + " End City: " + this.endCitySeed + " Slime: " + this.slimeSeed + " Nether: " + this.netherSeed + " Mansion: " + this.mansionSeed + " Fossil: " + this.fossilSeed + " Portal: " + this.portalSeed ); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.