add back random populator seed

This commit is contained in:
Ben Kerllenevich
2021-06-25 18:46:30 -04:00
parent 6d5a686a1d
commit 44e4acda63
151 changed files with 601 additions and 890 deletions

View File

@@ -94,26 +94,26 @@ index f8ede3588bfda9a7d4d5807311a3e9c2651fd0a3..56967cef0f184def046935e20148574f
if (NaturalSpawner.isSpawnPositionOk(SpawnPlacements.Type.ON_GROUND, world, blockposition2, EntityType.WANDERING_TRADER)) {
blockposition1 = blockposition2;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 73d2977dda0482ff2574719dfec4ca359699c485..65faed60a42cc058e242481afcc54081f4b9921c 100644
index 19d32ceea05206680b8d9a20f28c618b5817606c..65aba9a17a76e56c0140220ab00645a1e02cc8b5 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -310,7 +310,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData)worlddatamutable).getLevelName()); // Tuinity - Server Config
- this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName())); // Purpur
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()), env); // Purpur
- this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((ServerLevel) this, ((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Purpur
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((ServerLevel) this, ((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, env);
this.ticksPerAnimalSpawns = this.getCraftServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 9825fe8dd51f5dda74f6645f0ea78ee22746366e..ea1e7d9c917762457ecb8b22bcf790cdbe674da7 100644
index d821a0544a4bb3a5f015a81d64e73e3ed10f3bad..51997b73e5020e722915bce5db18909174d6697d 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -8,6 +8,8 @@ import net.minecraft.world.level.Explosion;
@@ -8,6 +8,8 @@ import net.minecraft.world.item.Items;
import net.minecraft.world.level.Explosion;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
+import org.apache.commons.lang.BooleanUtils;
+import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
@@ -127,20 +127,20 @@ index 9825fe8dd51f5dda74f6645f0ea78ee22746366e..ea1e7d9c917762457ecb8b22bcf790cd
import java.util.logging.Level;
import static net.pl3x.purpur.PurpurConfig.log;
@@ -23,9 +26,11 @@ import static net.pl3x.purpur.PurpurConfig.log;
public class PurpurWorldConfig {
@@ -24,9 +27,11 @@ public class PurpurWorldConfig {
private final ServerLevel level;
private final String worldName;
- public PurpurWorldConfig(ServerLevel level, String worldName) {
+ private final World.Environment environment;
- public PurpurWorldConfig(String worldName) {
+ public PurpurWorldConfig(String worldName, World.Environment environment) {
+ public PurpurWorldConfig(ServerLevel level, String worldName, World.Environment environment) {
this.level = level;
this.worldName = worldName;
+ this.environment = environment;
init();
}
@@ -53,6 +58,12 @@ public class PurpurWorldConfig {
@@ -54,6 +59,12 @@ public class PurpurWorldConfig {
return PurpurConfig.config.getBoolean("world-settings." + worldName + "." + path, PurpurConfig.config.getBoolean("world-settings.default." + path));
}
@@ -153,7 +153,7 @@ index 9825fe8dd51f5dda74f6645f0ea78ee22746366e..ea1e7d9c917762457ecb8b22bcf790cd
private double getDouble(String path, double def) {
PurpurConfig.config.addDefault("world-settings.default." + path, def);
return PurpurConfig.config.getDouble("world-settings." + worldName + "." + path, PurpurConfig.config.getDouble("world-settings.default." + path));
@@ -201,6 +212,21 @@ public class PurpurWorldConfig {
@@ -202,6 +213,21 @@ public class PurpurWorldConfig {
}
}