Skip to content

Commit

Permalink
Use dungeon seed on more than just the decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyGalbreath committed Jul 18, 2020
1 parent ee5fe2f commit f58d487
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patches/server/0111-Configurable-dungeon-seed.patch
Expand Up @@ -24,6 +24,21 @@ index 70d222996..73a2f2969 100644

return new BlockPosition(k, i1, l);
});
diff --git a/src/main/java/net/minecraft/server/WorldGenDungeons.java b/src/main/java/net/minecraft/server/WorldGenDungeons.java
index 3c7c93645..e13176fb0 100644
--- a/src/main/java/net/minecraft/server/WorldGenDungeons.java
+++ b/src/main/java/net/minecraft/server/WorldGenDungeons.java
@@ -16,7 +16,10 @@ public class WorldGenDungeons extends WorldGenerator<WorldGenFeatureEmptyConfigu
super(codec);
}

+ public boolean generate(GeneratorAccessSeed generatoraccessseed, StructureManager structuremanager, ChunkGenerator chunkgenerator, Random random, BlockPosition blockposition, WorldGenFeatureEmptyConfiguration worldgenfeatureemptyconfiguration) { return a(generatoraccessseed, structuremanager, chunkgenerator, random, blockposition, worldgenfeatureemptyconfiguration); } // Purpur - decompile error?
public boolean a(GeneratorAccessSeed generatoraccessseed, StructureManager structuremanager, ChunkGenerator chunkgenerator, Random random, BlockPosition blockposition, WorldGenFeatureEmptyConfiguration worldgenfeatureemptyconfiguration) {
+ int seed = net.pl3x.purpur.PurpurConfig.dungeonSeed; // Purpur
+ if (seed != -1) random = new Random(seed); // Purpur
boolean flag = true;
int i = random.nextInt(2) + 2;
int j = -i - 1;
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index f9b382dcc..cd524cabc 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
Expand Down

0 comments on commit f58d487

Please sign in to comment.