9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-24 01:09:29 +00:00

Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@617240e Updated Upstream (Paper)
This commit is contained in:
NONPLAYT
2023-09-06 13:33:21 +03:00
parent ab6af15f10
commit d82e710ae4
16 changed files with 266 additions and 259 deletions

View File

@@ -327,13 +327,13 @@ index 0000000000000000000000000000000000000000..5d16d2250bae9c982a0af9ad2580a635
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 12124d6fbc0406bb62bd95a0f7bab68afa43377c..6b4b687b114818cdd8bd2c6256d1d9cf1343bb83 100644
index 0da72241f940bd81a5d122d9d6ac2871f4d834e6..af53310d196020682dd981da98261fb3a72a6690 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -235,6 +235,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish
+ // DivineMC start
+ try {
+ gq.bxteam.divinemc.configuration.DivineConfig.init((java.io.File) options.valueOf("divinemc-settings"));
@@ -344,74 +344,74 @@ index 12124d6fbc0406bb62bd95a0f7bab68afa43377c..6b4b687b114818cdd8bd2c6256d1d9cf
+ gq.bxteam.divinemc.configuration.DivineConfig.registerCommands();
+ // DivineMC end
+
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index bdb32964524cb2a4398b8d3bedfb03b0cb805b6d..0eb08e6fe7079f2e76bc76d503395971d958ea9b 100644
index 2fa984bef4335f6042a4a0ab0af9af81e52984b7..af556d9355e327fcbe50cb08f99026e7255f485f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -15,6 +15,8 @@ import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nullable;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nullable;
+
+import gq.bxteam.divinemc.configuration.DivineWorldConfig;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
import net.minecraft.ReportedException;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
import net.minecraft.ReportedException;
@@ -177,6 +179,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
+ public final gq.bxteam.divinemc.configuration.DivineWorldConfig divinemcConfig; // DivineMC
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -332,6 +335,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
+ this.divinemcConfig = new DivineWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // DivineMC
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7921caca236900b9d1d234d95db5a24cc403d9b2..a8aed082ea5b10792380dc36d9920409edb5dfce 100644
index 17af7e23cba6d99fecde12f954c832de71f42947..e08d2d94ca6332bfee1b186eae0e728aee60eb37 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -15,6 +15,7 @@ import com.mojang.brigadier.tree.LiteralCommandNode;
import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
+import gq.bxteam.divinemc.configuration.DivineConfig;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
@@ -1072,6 +1073,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
+ gq.bxteam.divinemc.configuration.DivineConfig.init((File) console.options.valueOf("divinemc-settings")); // DivineMC
for (ServerLevel world : this.console.getAllLevels()) {
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1088,6 +1090,7 @@ public final class CraftServer implements Server {
}
world.spigotConfig.init(); // Spigot
}
world.spigotConfig.init(); // Spigot
world.purpurConfig.init(); // Purpur
+ world.divinemcConfig.init(); // DivineMC
}
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1104,6 +1107,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur
+ gq.bxteam.divinemc.configuration.DivineConfig.registerCommands(); // DivineMC
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -3016,6 +3020,13 @@ public final class CraftServer implements Server {
}
// Purpur end
@@ -423,11 +423,11 @@ index 7921caca236900b9d1d234d95db5a24cc403d9b2..a8aed082ea5b10792380dc36d9920409
+ }
+ // DivineMC end
+
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 9a3374a1236164194ef0df43ed639296cbe1c731..0373c0a343e990c1aa993b00b8254b09b3c5f0e3 100644
index 898e9c968c12b2dc62ee4da11202e5a633ee2203..ff09eef761ca7c0d6a09ce8fcfbdf1ac14ca5956 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -187,6 +187,14 @@ public class Main {