2022-06-09 10:51:45 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-08-01 16:01:20 +02:00
|
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
2022-06-09 10:51:45 +02:00
|
|
|
Date: Tue, 31 Aug 2021 17:05:27 +0200
|
|
|
|
Subject: [PATCH] Configurable feature seeds
|
|
|
|
|
|
|
|
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
2024-10-25 14:55:49 +02:00
|
|
|
index e3c5a49611d584fbd19a44da5aa78ff6d7c43881..fc8e3edd9734fa7b69f0fc6b4eefd8a704e451cf 100644
|
2022-06-09 10:51:45 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
2024-06-14 02:08:12 +02:00
|
|
|
@@ -436,7 +436,14 @@ public abstract class ChunkGenerator {
|
2022-06-09 10:51:45 +02:00
|
|
|
return (String) optional.orElseGet(placedfeature::toString);
|
|
|
|
};
|
|
|
|
|
|
|
|
- seededrandom.setFeatureSeed(i, l1, l);
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper start - Configurable feature seeds; change populationSeed used in random
|
2022-06-09 10:51:45 +02:00
|
|
|
+ long featurePopulationSeed = i;
|
2022-06-09 13:16:00 +02:00
|
|
|
+ final long configFeatureSeed = generatoraccessseed.getMinecraftWorld().paperConfig().featureSeeds.features.getLong(placedfeature.feature());
|
2022-06-09 10:51:45 +02:00
|
|
|
+ if (configFeatureSeed != -1) {
|
|
|
|
+ featurePopulationSeed = seededrandom.setDecorationSeed(configFeatureSeed, blockposition.getX(), blockposition.getZ()); // See seededrandom.setDecorationSeed from above
|
|
|
|
+ }
|
|
|
|
+ seededrandom.setFeatureSeed(featurePopulationSeed, l1, l);
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper end - Configurable feature seeds
|
2022-06-09 10:51:45 +02:00
|
|
|
|
|
|
|
try {
|
|
|
|
generatoraccessseed.setCurrentlyGenerating(supplier1);
|