[ci-skip] Reorder configs

This commit is contained in:
BillyGalbreath
2021-12-31 09:45:42 -06:00
parent 2e4174e033
commit 1c9c6b910a
180 changed files with 906 additions and 903 deletions

View File

@@ -30,7 +30,7 @@ index 218f5bafeed8551b55b91c7fccaf6935c8b631ca..7bc497bcae6a6a752e3c432178cb1e3c
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index cb0045fc4ddd738c45dee89d57b213a633b9a136..6e8111ef16439d2b3025ebe2a0418b245420bd88 100644
index 098182d2426a25cef0bc285356bc346db0af8172..c26435a6b5cdc61ae5d123dacea711a4a9f666d1 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -236,6 +236,30 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
@@ -85,7 +85,7 @@ index fd3d3e22613511a42f7fc343079b081c72ff3f61..8bf98d8f8e9f0baaf203a9e8d1868323
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // load mappings for stacktrace deobf and etc.
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4247dcb003626535dbb997f48ad9f61380bd17e9..03a4c5fa746033825c26a031fbf79f721be6fa84 100644
index 4247dcb003626535dbb997f48ad9f61380bd17e9..76faf838e27813595850ebb8c9a028f1c68325ad 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -169,6 +169,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -101,7 +101,7 @@ index 4247dcb003626535dbb997f48ad9f61380bd17e9..03a4c5fa746033825c26a031fbf79f72
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
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.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig((ServerLevel) this, ((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
this.ticksPerAnimalSpawns = this.getCraftServer().getTicksPerAnimalSpawns(); // CraftBukkit
@@ -338,16 +338,14 @@ index 0000000000000000000000000000000000000000..fdfb20170c27711085aa077286687603
+}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..41e1c1c801f7734d123e7e8fb68b84167d49ff6c
index 0000000000000000000000000000000000000000..ad0c7304f8791b2dca92d9e0c5412354e174d5be
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -0,0 +1,96 @@
@@ -0,0 +1,90 @@
+package org.purpurmc.purpur;
+
+import net.minecraft.core.Registry;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.Difficulty;
+import net.minecraft.world.item.DyeColor;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.item.Items;
@@ -366,10 +364,8 @@ index 0000000000000000000000000000000000000000..41e1c1c801f7734d123e7e8fb68b8416
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.logging.Level;
+import static org.purpurmc.purpur.PurpurConfig.log;
@@ -377,12 +373,10 @@ index 0000000000000000000000000000000000000000..41e1c1c801f7734d123e7e8fb68b8416
+@SuppressWarnings("unused")
+public class PurpurWorldConfig {
+
+ private final ServerLevel level;
+ private final String worldName;
+ private final World.Environment environment;
+
+ public PurpurWorldConfig(ServerLevel level, String worldName, World.Environment environment) {
+ this.level = level;
+ public PurpurWorldConfig(String worldName, World.Environment environment) {
+ this.worldName = worldName;
+ this.environment = environment;
+ init();