mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 10:11:29 +01:00
ed7396781e
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: fc460d1b PR-735: Add Villager#zombify c8c8331e PR-690: Add method to read ItemStack input 62845f2f SPIGOT-6829: Add per-player world border API CraftBukkit Changes: a459f4d4 PR-1033: Add Villager#zombify d65d1430 PR-975: Add method to read ItemStack input b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil 6c308e1b SPIGOT-6829: Add per-player world border API Spigot Changes: 42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
47 lines
2.9 KiB
Diff
47 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Thu, 13 Jan 2022 23:05:53 -0800
|
|
Subject: [PATCH] Add config for stronghold seed
|
|
|
|
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
|
@@ -0,0 +0,0 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource {
|
|
int k = concentricringsstructureplacement.spread();
|
|
Random random = new Random();
|
|
|
|
+ // Paper start
|
|
+ if (this.conf.strongholdSeed != null && this.structureSets.getResourceKey(holder).orElse(null) == net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS) {
|
|
+ random.setSeed(this.conf.strongholdSeed);
|
|
+ } else {
|
|
+ // Paper end
|
|
random.setSeed(this.ringPlacementSeed);
|
|
+ } // Paper
|
|
double d0 = random.nextDouble() * 3.141592653589793D * 2.0D;
|
|
int l = 0;
|
|
int i1 = 0;
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
|
public int mansionSeed;
|
|
public int fossilSeed;
|
|
public int portalSeed;
|
|
+ public Long strongholdSeed; // Paper
|
|
private void initWorldGenSeeds()
|
|
{
|
|
this.villageSeed = this.getInt( "seed-village", 10387312 );
|
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
|
this.mansionSeed = this.getInt( "seed-mansion", 10387319 );
|
|
this.fossilSeed = this.getInt( "seed-fossil", 14357921 );
|
|
this.portalSeed = this.getInt( "seed-portal", 34222645 );
|
|
+ // Paper start
|
|
+ final String strongholdSeedString = this.getString("seed-stronghold", "default");
|
|
+ this.strongholdSeed = org.apache.commons.lang3.math.NumberUtils.isParsable(strongholdSeedString) ? Long.parseLong(strongholdSeedString) : null;
|
|
+ // Paper end
|
|
this.log( "Custom Map Seeds: Village: " + this.villageSeed + " Desert: " + this.desertSeed + " Igloo: " + this.iglooSeed + " Jungle: " + this.jungleSeed + " Swamp: " + this.swampSeed + " Monument: " + this.monumentSeed
|
|
+ " Ocean: " + this.oceanSeed + " Shipwreck: " + this.shipwreckSeed + " End City: " + this.endCitySeed + " Slime: " + this.slimeSeed + " Nether: " + this.netherSeed + " Mansion: " + this.mansionSeed + " Fossil: " + this.fossilSeed + " Portal: " + this.portalSeed );
|
|
}
|