mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
50 lines
3.0 KiB
Diff
50 lines
3.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Thu, 27 Feb 2020 21:42:19 -0600
|
|
Subject: [PATCH] Configurable void damage height and damage
|
|
|
|
temporarily migrate to paper's config
|
|
drop patch on the next minecraft release
|
|
|
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
|
index b5011af774484b6ed35ee83b4a562ddd4425c22f..514b7d86c403568ddb130e7f7798867f838e1203 100644
|
|
--- a/net/minecraft/server/MinecraftServer.java
|
|
+++ b/net/minecraft/server/MinecraftServer.java
|
|
@@ -1198,7 +1198,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
LOGGER.info("*************************************************************************************");
|
|
}
|
|
// Paper end - Add onboarding message for initial server start
|
|
-
|
|
+ // Purpur start - Configurable void damage height and damage
|
|
+ if (org.purpurmc.purpur.configuration.transformation.VoidDamageHeightMigration.HAS_BEEN_REGISTERED) {
|
|
+ try {
|
|
+ org.purpurmc.purpur.PurpurConfig.config.save((File) this.options.valueOf("purpur-settings"));
|
|
+ } catch (IOException ex) {
|
|
+ Bukkit.getLogger().log(java.util.logging.Level.SEVERE, "Could not save " + this.options.valueOf("purpur-settings"), ex);
|
|
+ }
|
|
+ }
|
|
+ // Purpur end - Configurable void damage height and damage
|
|
while (this.running) {
|
|
long l;
|
|
if (!this.isPaused() && this.tickRateManager.isSprinting() && this.tickRateManager.checkShouldSprintThisTick()) {
|
|
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
|
index aa896acd15916df24e646d10a7a3c5157044b4bd..92948d75c928368f3d1999b45951648a6be3fdc7 100644
|
|
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -208,6 +208,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
org.spigotmc.SpigotConfig.registerCommands();
|
|
// Spigot end
|
|
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
|
|
+ // Purpur start - Configurable void damage height and damage
|
|
+ try {
|
|
+ org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings"));
|
|
+ } catch (Exception e) {
|
|
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
|
|
+ return false;
|
|
+ }
|
|
+ org.purpurmc.purpur.PurpurConfig.registerCommands();
|
|
+ // Purpur end - Configurable void damage height and damage
|
|
// Paper start - initialize global and world-defaults configuration
|
|
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|