mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-08 03:39:48 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
41 lines
2.8 KiB
Diff
41 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
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/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
index 98171f6c8e23f6ef89b897e4b80e3afb2a1950a0..06bff37e4c1fddd3be6343049a66787c63fb420c 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
@@ -287,7 +287,7 @@ public class TimingsExport extends Thread {
|
|
JSONObject object = new JSONObject();
|
|
for (String key : config.getKeys(false)) {
|
|
String fullKey = (parentKey != null ? parentKey + "." + key : key);
|
|
- if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey) || key.startsWith("seed-") || key.equals("worldeditregentempworld")) {
|
|
+ if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey) || key.startsWith("seed-") || key.equals("worldeditregentempworld") || key.equals("feature-seeds")) {
|
|
continue;
|
|
}
|
|
final Object val = config.get(key);
|
|
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 50b9c2fbe3a5c12a43b4711d678ed2398dbdee58..cc79ca7ee770408ec59b1f6a3f4ec58e23bd2619 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
@@ -606,7 +606,14 @@ public abstract class ChunkGenerator {
|
|
return (String) optional.orElseGet(placedfeature::toString);
|
|
};
|
|
|
|
- seededrandom.setFeatureSeed(i, l1, l);
|
|
+ // Paper start - change populationSeed used in random
|
|
+ long featurePopulationSeed = i;
|
|
+ final long configFeatureSeed = generatoraccessseed.getMinecraftWorld().paperConfig().featureSeeds.features.getLong(placedfeature.feature());
|
|
+ if (configFeatureSeed != -1) {
|
|
+ featurePopulationSeed = seededrandom.setDecorationSeed(configFeatureSeed, blockposition.getX(), blockposition.getZ()); // See seededrandom.setDecorationSeed from above
|
|
+ }
|
|
+ seededrandom.setFeatureSeed(featurePopulationSeed, l1, l);
|
|
+ // Paper end
|
|
|
|
try {
|
|
generatoraccessseed.setCurrentlyGenerating(supplier1);
|