mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Move all config stuff to config patch
This commit is contained in:
@@ -142,7 +142,7 @@ index ca7718053a6a2eb715ea3671bd4bc15304ede420..bf31ae9f1ea08d67e7e828cff07b30a3
|
||||
public void sendMessage(Component message, UUID sender) {}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 862553e98a7237d39a26036c615b9cbd001bd3bf..b5347e768a17e0771163cb73f2d5ccc0d2b50ee3 100644
|
||||
index 862553e98a7237d39a26036c615b9cbd001bd3bf..d11b463548b847382a22fdf50496b186caa0c526 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -168,6 +168,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -158,7 +158,7 @@ index 862553e98a7237d39a26036c615b9cbd001bd3bf..b5347e768a17e0771163cb73f2d5ccc0
|
||||
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((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
|
||||
@@ -300,24 +300,48 @@ index 0000000000000000000000000000000000000000..7c5ecdbd5a05ae07a440cadf79d59a43
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b760473245a50941129b4063998e7725366db4da
|
||||
index 0000000000000000000000000000000000000000..3cd897d4049323aeda85c89a73a3f50bd7b94d58
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -0,0 +1,85 @@
|
||||
+package net.pl3x.purpur;
|
||||
+
|
||||
+import com.tuinity.tuinity.config.TuinityConfig;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+import net.minecraft.core.Registry;
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+import net.minecraft.world.Difficulty;
|
||||
+import net.minecraft.world.item.DyeColor;
|
||||
+import net.minecraft.world.item.Item;
|
||||
+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;
|
||||
+
|
||||
+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 net.pl3x.purpur.PurpurConfig.log;
|
||||
+
|
||||
+public class PurpurWorldConfig {
|
||||
+
|
||||
+ private final ServerLevel level;
|
||||
+ private final String worldName;
|
||||
+ public PurpurWorldConfig(ServerLevel level, String worldName) {
|
||||
+ private final World.Environment environment;
|
||||
+
|
||||
+ public PurpurWorldConfig(ServerLevel level, String worldName, World.Environment environment) {
|
||||
+ this.level = level;
|
||||
+ this.worldName = worldName;
|
||||
+ this.environment = environment;
|
||||
+ init();
|
||||
+ }
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user