Paper/CraftBukkit-Patches/0130-Further-Seed-Customisation.patch
Zach Brown 19972e09b8 Update SpigotMC's patches
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK
e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge
d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch
068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
2014-11-30 16:16:48 -06:00

55 lines
2.2 KiB
Diff

From e58fbbf29dd242c7977aa6ea455adf7371bbba29 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Fri, 4 Jul 2014 13:28:45 +1000
Subject: [PATCH] Further Seed Customisation
Allow server admins that really want to to customise the seeds used in world generation even further.
diff --git a/src/main/java/net/minecraft/server/WorldGenLargeFeature.java b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
index 02e6208..0bd6783 100644
--- a/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
+++ b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
@@ -54,7 +54,7 @@ public class WorldGenLargeFeature extends StructureGenerator {
int i1 = i / this.g;
int j1 = j / this.g;
- Random random = this.c.a(i1, j1, 14357617);
+ Random random = this.c.a(i1, j1, this.c.spigotConfig.largeFeatureSeed); // Spigot
i1 *= this.g;
j1 *= this.g;
diff --git a/src/main/java/net/minecraft/server/WorldGenVillage.java b/src/main/java/net/minecraft/server/WorldGenVillage.java
index 375de85..bf699af 100644
--- a/src/main/java/net/minecraft/server/WorldGenVillage.java
+++ b/src/main/java/net/minecraft/server/WorldGenVillage.java
@@ -53,7 +53,7 @@ public class WorldGenVillage extends StructureGenerator {
int i1 = i / this.g;
int j1 = j / this.g;
- Random random = this.c.a(i1, j1, 10387312);
+ Random random = this.c.a(i1, j1, this.c.spigotConfig.villageSeed); // Spigot
i1 *= this.g;
j1 *= this.g;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 7904926..df43af5 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -292,4 +292,13 @@ public class SpigotWorldConfig
{
witherSpawnSoundRadius = getInt( "wither-spawn-sound-radius", 0 );
}
+
+ public int villageSeed;
+ public int largeFeatureSeed;
+ private void initWorldGenSeeds()
+ {
+ villageSeed = getInt( "seed-village", 10387312 );
+ largeFeatureSeed = getInt( "seed-feature", 14357617 );
+ log( "Custom Map Seeds: Village: " + villageSeed + " Feature: " + largeFeatureSeed );
+ }
}
--
2.1.0