Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/CraftBukkit-Patches/0114-Further-Seed-Customisation.patch

55 Zeilen
2.2 KiB
Diff

2016-03-01 01:23:45 +01:00
From 74e653a9ea9ca9c082ba6230c5460aeaf39e9de5 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
2016-02-29 22:33:06 +01:00
index 462dc76..1ab69cc 100644
--- a/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
+++ b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
2014-11-28 02:17:45 +01:00
@@ -54,7 +54,7 @@ public class WorldGenLargeFeature extends StructureGenerator {
2016-02-29 22:33:06 +01:00
int i1 = i / this.d;
int j1 = j / this.d;
- Random random = this.g.a(i1, j1, 14357617);
+ Random random = this.g.a(i1, j1, this.g.spigotConfig.largeFeatureSeed); // Spigot
2016-02-29 22:33:06 +01:00
i1 *= this.d;
j1 *= this.d;
diff --git a/src/main/java/net/minecraft/server/WorldGenVillage.java b/src/main/java/net/minecraft/server/WorldGenVillage.java
2016-02-29 22:33:06 +01:00
index 2f43742..02d8fec 100644
--- a/src/main/java/net/minecraft/server/WorldGenVillage.java
+++ b/src/main/java/net/minecraft/server/WorldGenVillage.java
2014-11-28 02:17:45 +01:00
@@ -53,7 +53,7 @@ public class WorldGenVillage extends StructureGenerator {
2016-02-29 22:33:06 +01:00
int i1 = i / this.d;
int j1 = j / this.d;
- Random random = this.g.a(i1, j1, 10387312);
+ Random random = this.g.a(i1, j1, this.g.spigotConfig.villageSeed); // Spigot
2016-02-29 22:33:06 +01:00
i1 *= this.d;
j1 *= this.d;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2016-02-29 22:33:06 +01:00
index 79a3124..7cf8f2d 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2016-02-29 22:33:06 +01:00
@@ -243,4 +243,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 );
+ }
}
--
2016-02-29 22:33:06 +01:00
2.5.0