some fixes
This commit is contained in:
@@ -5,6 +5,8 @@ org.gradle.parallel = true
|
|||||||
org.gradle.vfs.watch = false
|
org.gradle.vfs.watch = false
|
||||||
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true
|
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true
|
||||||
|
|
||||||
|
paper.runMemoryGb = 8
|
||||||
|
|
||||||
org.plazmamc.alwaysuptodate.paper.repository = https://github.com/PaperMC/Paper
|
org.plazmamc.alwaysuptodate.paper.repository = https://github.com/PaperMC/Paper
|
||||||
org.plazmamc.alwaysuptodate.purpur.repository = https://github.com/PurpurMC/Purpur
|
org.plazmamc.alwaysuptodate.purpur.repository = https://github.com/PurpurMC/Purpur
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Warn on startup
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index 2579b32009a5f5e288edf56ee8f1246cd70343fc..c59a1b6a365bf80ac913c1a9c939ad2cc5f3b963 100644
|
index 2579b32009a5f5e288edf56ee8f1246cd70343fc..dafd37b3a31fbf63113787ccf6697651f5e1770d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -127,6 +127,18 @@ public class Main {
|
@@ -127,6 +127,18 @@ public class Main {
|
||||||
@@ -17,7 +17,7 @@ index 2579b32009a5f5e288edf56ee8f1246cd70343fc..c59a1b6a365bf80ac913c1a9c939ad2c
|
|||||||
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
||||||
+ if (com.destroystokyo.paper.PaperVersionFetcher.DEVELOPMENT) {
|
+ if (com.destroystokyo.paper.PaperVersionFetcher.DEVELOPMENT) {
|
||||||
+ LOGGER.error("*********************** CAUTION ***********************");
|
+ LOGGER.error("*********************** CAUTION ***********************");
|
||||||
+ LOGGER.error("This version is a developed version of Plazma.");
|
+ LOGGER.error("This version is a development version of Plazma.");
|
||||||
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
|
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
|
||||||
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
|
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
|
||||||
+ LOGGER.error("*******************************************************");
|
+ LOGGER.error("*******************************************************");
|
||||||
|
|||||||
@@ -191,6 +191,18 @@ index 2903c9a2480ac505f0931d29ac3c5013037e65f1..39f7a4d3711a182b30d5b8eb77c23541
|
|||||||
// Paper start
|
// Paper start
|
||||||
for (final io.papermc.paper.chunk.SingleThreadChunkRegionManager regionManager : worldserver.getChunkSource().chunkMap.regionManagers) {
|
for (final io.papermc.paper.chunk.SingleThreadChunkRegionManager regionManager : worldserver.getChunkSource().chunkMap.regionManagers) {
|
||||||
regionManager.recalculateRegions();
|
regionManager.recalculateRegions();
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
index 8289334e77999f72214c330a3306cbfeb17afbf1..f661418d27f5692a51b880f64180866f7d19d66a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
|
@@ -224,6 +224,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||||
|
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||||
|
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||||
|
+ net.sparklypower.sparklypaper.HalloweenManager.startSyncEpochTask(); // Plazma - Port SparklyPaper patches; Optimize Spooky Season
|
||||||
|
// Paper end - initialize global and world-defaults configuration
|
||||||
|
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||||
|
if (this.convertOldUsers()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 4e6fccec4f5ca14562bf5bae495ac36c14982d85..9162c6338dbb516ce60f4853e57da6e49be79282 100644
|
index 4e6fccec4f5ca14562bf5bae495ac36c14982d85..9162c6338dbb516ce60f4853e57da6e49be79282 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -304,7 +316,7 @@ index f890738d3bb9fb5e70a9d323c6cec97f9948f9cf..eb3fc1af68768383d524cf0f50c4f4b3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
index 47a7c7f9527e1c4ea457eeafe0e11145653a871f..ed5a98b7e9ef2879fdcb2d5a77aeb1d483682a14 100644
|
index 47a7c7f9527e1c4ea457eeafe0e11145653a871f..d2151a355e3ee8a6f8b4f28b2ce7ac382c939ad3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
@@ -306,7 +306,7 @@ public class Bat extends AmbientCreature {
|
@@ -306,7 +306,7 @@ public class Bat extends AmbientCreature {
|
||||||
@@ -324,7 +336,7 @@ index 47a7c7f9527e1c4ea457eeafe0e11145653a871f..ed5a98b7e9ef2879fdcb2d5a77aeb1d4
|
|||||||
+ // Plazma start - Port SparklyPaper patches; Optimize Spooky Season
|
+ // Plazma start - Port SparklyPaper patches; Optimize Spooky Season
|
||||||
+ private static boolean isSpookySeason(Level level) {
|
+ private static boolean isSpookySeason(Level level) {
|
||||||
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
||||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize.enabled)
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize)
|
||||||
+ return net.sparklypower.sparklypaper.HalloweenManager.isSpookySeason()
|
+ return net.sparklypower.sparklypaper.HalloweenManager.isSpookySeason()
|
||||||
+ || net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
+ || net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
||||||
+ return isHalloween();
|
+ return isHalloween();
|
||||||
@@ -332,7 +344,7 @@ index 47a7c7f9527e1c4ea457eeafe0e11145653a871f..ed5a98b7e9ef2879fdcb2d5a77aeb1d4
|
|||||||
+
|
+
|
||||||
+ public static boolean isHalloweenSeason(Level level) {
|
+ public static boolean isHalloweenSeason(Level level) {
|
||||||
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
||||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize.enabled)
|
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize)
|
||||||
+ return net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
+ return net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
||||||
+ return isHalloween();
|
+ return isHalloween();
|
||||||
+ }
|
+ }
|
||||||
@@ -731,10 +743,10 @@ index fd637415625fdabcac07e120e9168d09c06141d4..37120fcb31f4c9a90be37db252b17eb9
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
diff --git a/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..0df2a464845193382bd559141955e31337c9e4e2
|
index 0000000000000000000000000000000000000000..f8c26e26025d7a7b5489ed5b3274ba734db27a1d
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
+++ b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
||||||
@@ -0,0 +1,100 @@
|
@@ -0,0 +1,78 @@
|
||||||
+package net.sparklypower.sparklypaper;
|
+package net.sparklypower.sparklypaper;
|
||||||
+
|
+
|
||||||
+import com.mojang.logging.LogUtils;
|
+import com.mojang.logging.LogUtils;
|
||||||
@@ -755,8 +767,7 @@ index 0000000000000000000000000000000000000000..0df2a464845193382bd559141955e313
|
|||||||
+
|
+
|
||||||
+public class HalloweenManager {
|
+public class HalloweenManager {
|
||||||
+
|
+
|
||||||
+ private static final Logger LOGGER = LogUtils.getLogger();
|
+ private static final Logger LOGGER = LogUtils.getClassLogger();
|
||||||
+ private static final CountDownLatch LATCH = new CountDownLatch(1);
|
|
||||||
+ private static final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor(factory -> {
|
+ private static final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor(factory -> {
|
||||||
+ Thread thread = new Thread(factory);
|
+ Thread thread = new Thread(factory);
|
||||||
+ thread.setName("halloween-timer-updater");
|
+ thread.setName("halloween-timer-updater");
|
||||||
@@ -764,30 +775,10 @@ index 0000000000000000000000000000000000000000..0df2a464845193382bd559141955e313
|
|||||||
+ return thread;
|
+ return thread;
|
||||||
+ });
|
+ });
|
||||||
+
|
+
|
||||||
+ private static ScheduledFuture<?> TASK;
|
+ private static ScheduledFuture<?> future;
|
||||||
+ private static Pair<Month, Integer> spookyStart;
|
|
||||||
+ private static Pair<Month, Integer> spookyEnd;
|
|
||||||
+ private static Pair<Month, Integer> halloweenStart;
|
|
||||||
+ private static Pair<Month, Integer> halloweenEnd;
|
|
||||||
+
|
|
||||||
+ private static Pair<Long, Long> spookyEpoch;
|
+ private static Pair<Long, Long> spookyEpoch;
|
||||||
+ private static Pair<Long, Long> halloweenEpoch;
|
+ private static Pair<Long, Long> halloweenEpoch;
|
||||||
+
|
+
|
||||||
+ public static void syncConfiguration() {
|
|
||||||
+ if (!get().entity.spookyOptimize.enabled && TASK != null && !TASK.isCancelled()) {
|
|
||||||
+ TASK.cancel(true);
|
|
||||||
+ TASK = null;
|
|
||||||
+ return;
|
|
||||||
+ } else if (get().entity.spookyOptimize.enabled && TASK == null) {
|
|
||||||
+ startSyncEpochTask();
|
|
||||||
+ }
|
|
||||||
+ spookyStart = get().entity.spookyOptimize.spookySeason.start.toPair();
|
|
||||||
+ spookyEnd = get().entity.spookyOptimize.spookySeason.end.toPair();
|
|
||||||
+ halloweenStart = get().entity.spookyOptimize.halloween.start.toPair();
|
|
||||||
+ halloweenEnd = get().entity.spookyOptimize.halloween.end.toPair();
|
|
||||||
+ syncEpoch();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ private static long getEpochMillisAtDate(Month month, int day, boolean start) {
|
+ private static long getEpochMillisAtDate(Month month, int day, boolean start) {
|
||||||
+ LocalDateTime now = LocalDateTime.now();
|
+ LocalDateTime now = LocalDateTime.now();
|
||||||
+ LocalDateTime target = LocalDateTime.of(
|
+ LocalDateTime target = LocalDateTime.of(
|
||||||
@@ -801,31 +792,30 @@ index 0000000000000000000000000000000000000000..0df2a464845193382bd559141955e313
|
|||||||
+ private static void syncEpoch() {
|
+ private static void syncEpoch() {
|
||||||
+ LOGGER.info("Updating Spooky Season and Halloween epoch...");
|
+ LOGGER.info("Updating Spooky Season and Halloween epoch...");
|
||||||
+ spookyEpoch = Pair.of(
|
+ spookyEpoch = Pair.of(
|
||||||
+ getEpochMillisAtDate(spookyStart.first(), spookyStart.second(), true),
|
+ getEpochMillisAtDate(Month.OCTOBER, 20, true),
|
||||||
+ getEpochMillisAtDate(spookyEnd.first(), spookyEnd.second(), false)
|
+ getEpochMillisAtDate(Month.NOVEMBER, 3, false)
|
||||||
+ );
|
+ );
|
||||||
+ halloweenEpoch = Pair.of(
|
+ halloweenEpoch = Pair.of(
|
||||||
+ getEpochMillisAtDate(halloweenStart.first(), halloweenStart.second(), true),
|
+ getEpochMillisAtDate(Month.OCTOBER, 31, true),
|
||||||
+ getEpochMillisAtDate(halloweenEnd.first(), halloweenEnd.second(), false)
|
+ getEpochMillisAtDate(Month.OCTOBER, 31, false)
|
||||||
+ );
|
+ );
|
||||||
+ LOGGER.info("Successfully updated Spooky Season and Halloween epoch");
|
+ LOGGER.info("Successfully updated Spooky Season and Halloween epoch");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static void startSyncEpochTask() {
|
+ public static void syncConfiguration() {
|
||||||
+ if (!get().entity.spookyOptimize.enabled) return;
|
+ if (get().entity.spookyOptimize && future == null) {
|
||||||
+ final AtomicBoolean first = new AtomicBoolean(false);
|
+ startSyncEpochTask();
|
||||||
+ TASK = EXECUTOR.scheduleAtFixedRate(() -> {
|
+ } else if (!get().entity.spookyOptimize && future != null) {
|
||||||
+ syncEpoch();
|
+ future.cancel(true);
|
||||||
+ if (first.get()) LATCH.countDown();
|
+ future = null;
|
||||||
+ first.set(false);
|
|
||||||
+ }, 0, 90, TimeUnit.DAYS);
|
|
||||||
+ try {
|
|
||||||
+ LATCH.await();
|
|
||||||
+ } catch (InterruptedException e) {
|
|
||||||
+ throw new RuntimeException(e);
|
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ public static void startSyncEpochTask() {
|
||||||
|
+ if (!get().entity.spookyOptimize) return;
|
||||||
|
+ future = EXECUTOR.scheduleAtFixedRate(HalloweenManager::syncEpoch, 0, 90, TimeUnit.DAYS);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ public static boolean isSpookySeason() {
|
+ public static boolean isSpookySeason() {
|
||||||
+ return spookyEpoch.first() <= System.currentTimeMillis() && System.currentTimeMillis() <= spookyEpoch.second();
|
+ return spookyEpoch.first() <= System.currentTimeMillis() && System.currentTimeMillis() <= spookyEpoch.second();
|
||||||
+ }
|
+ }
|
||||||
@@ -875,56 +865,15 @@ index 8149b9c51b78eb5c689b7218a2ca3aab60e73bcf..b9a303f6280a2f6ad3616da152922a4f
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
index 57d29f8f3bc89529db9ee8f6dc3fffdbd4a03ceb..5b0d1ad2d3e8fb7ddb9f58288c175ffd0f4ccd57 100644
|
index 57d29f8f3bc89529db9ee8f6dc3fffdbd4a03ceb..73dd69941a004b4a2ec244f28d8683e9bdb0a445 100644
|
||||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
@@ -40,9 +40,53 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -40,9 +40,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
public Entity entity;
|
public Entity entity;
|
||||||
public class Entity extends ConfigurationPart {
|
public class Entity extends ConfigurationPart {
|
||||||
|
|
||||||
+ boolean skipSqrWhenNoDeltaChanges = OPTIMIZE;
|
+ boolean skipSqrWhenNoDeltaChanges = OPTIMIZE;
|
||||||
+
|
+ public boolean spookyOptimize = OPTIMIZE;
|
||||||
+ public SpookyOptimize spookyOptimize;
|
|
||||||
+ public class SpookyOptimize extends ConfigurationPart {
|
|
||||||
+
|
|
||||||
+ public boolean enabled = OPTIMIZE;
|
|
||||||
+ public Time spookySeason = new Time(10, 20, 11, 3);
|
|
||||||
+ public Time halloween = new Time(11, 31, 11, 31);
|
|
||||||
+
|
|
||||||
+ @PostProcess
|
|
||||||
+ public void post() {
|
|
||||||
+ net.sparklypower.sparklypaper.HalloweenManager.syncConfiguration();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public class Time extends ConfigurationPart {
|
|
||||||
+
|
|
||||||
+ public Date start;
|
|
||||||
+ public Date end;
|
|
||||||
+
|
|
||||||
+ public class Date extends ConfigurationPart {
|
|
||||||
+
|
|
||||||
+ int month;
|
|
||||||
+ int day;
|
|
||||||
+
|
|
||||||
+ Date(int month, int day) {
|
|
||||||
+ this.month = month;
|
|
||||||
+ this.day = day;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public it.unimi.dsi.fastutil.Pair<java.time.Month, Integer> toPair() {
|
|
||||||
+ return it.unimi.dsi.fastutil.Pair.of(java.time.Month.of(this.month), this.day);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Time(int startMonth, int startDay, int endMonth, int endDay) {
|
|
||||||
+ this.start = new Date(startMonth, startDay);
|
|
||||||
+ this.end = new Date(endMonth, endDay);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
|
|
||||||
@PostProcess
|
@PostProcess
|
||||||
public void post() {
|
public void post() {
|
||||||
@@ -932,7 +881,7 @@ index 57d29f8f3bc89529db9ee8f6dc3fffdbd4a03ceb..5b0d1ad2d3e8fb7ddb9f58288c175ffd
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -50,9 +94,11 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -50,9 +53,11 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
public World world;
|
public World world;
|
||||||
public class World extends ConfigurationPart {
|
public class World extends ConfigurationPart {
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Tweak console logging
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 8289334e77999f72214c330a3306cbfeb17afbf1..361dc9c3434d9b4ac4b9966fa09b17f6820b0f22 100644
|
index f661418d27f5692a51b880f64180866f7d19d66a..ddfbc49a693d3100e915f5083f1f8e99df2d4b64 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -193,16 +193,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -193,16 +193,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
@@ -25,9 +25,9 @@ index 8289334e77999f72214c330a3306cbfeb17afbf1..361dc9c3434d9b4ac4b9966fa09b17f6
|
|||||||
DedicatedServer.LOGGER.info("Loading properties");
|
DedicatedServer.LOGGER.info("Loading properties");
|
||||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||||
|
|
||||||
@@ -225,6 +215,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -226,6 +216,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
|
||||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||||
|
net.sparklypower.sparklypaper.HalloweenManager.startSyncEpochTask(); // Plazma - Port SparklyPaper patches; Optimize Spooky Season
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// Paper end - initialize global and world-defaults configuration
|
||||||
+ // Plazma - Tweak console logging; Moved down
|
+ // Plazma - Tweak console logging; Moved down
|
||||||
+ // Paper start - detect running as root
|
+ // Paper start - detect running as root
|
||||||
@@ -43,7 +43,7 @@ index 8289334e77999f72214c330a3306cbfeb17afbf1..361dc9c3434d9b4ac4b9966fa09b17f6
|
|||||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
||||||
this.getProfileCache().save(false); // Paper
|
this.getProfileCache().save(false); // Paper
|
||||||
@@ -330,6 +331,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -331,6 +332,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||||
// Paper end - Add Velocity IP Forwarding Support
|
// Paper end - Add Velocity IP Forwarding Support
|
||||||
@@ -51,7 +51,7 @@ index 8289334e77999f72214c330a3306cbfeb17afbf1..361dc9c3434d9b4ac4b9966fa09b17f6
|
|||||||
if (!this.usesAuthentication()) {
|
if (!this.usesAuthentication()) {
|
||||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||||
@@ -343,7 +345,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -344,7 +346,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -73,10 +73,10 @@ index b863f6fe65c796a1d3102cc3eddb5d6c5becd3ac..2707a96f9e22469d008ec7d2fa8a8c49
|
|||||||
this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
|
this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
|
||||||
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
|
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
index 306b503737394a51407a03f7f5cb8f7bd4b0eea2..fa01da3de63db24b069d7888283650394bf4af83 100644
|
index 73dd69941a004b4a2ec244f28d8683e9bdb0a445..e725f6e8205976a7b137aefb98b874cf4ae14893 100644
|
||||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
@@ -109,4 +109,13 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -68,4 +68,13 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -361,10 +361,10 @@ index 8c587f829c5e8c6b6df3150024c4ae704988c47b..319f484b535143a94ee2da11114acacc
|
|||||||
}
|
}
|
||||||
+// Plazma end - Completely remove Mojang's Profiler
|
+// Plazma end - Completely remove Mojang's Profiler
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 361dc9c3434d9b4ac4b9966fa09b17f6820b0f22..705a71ca533ad9b6dab394c8cbcbb9814d72ec84 100644
|
index ddfbc49a693d3100e915f5083f1f8e99df2d4b64..6d39a0d5455fbb0af3916b751d02386af3aa3598 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -922,11 +922,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -923,11 +923,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
return this.settings.getProperties().serverResourcePackInfo;
|
return this.settings.getProperties().serverResourcePackInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1377,7 +1377,7 @@ index c5454b92ca2565461c799d7340160f9fb72c1b0f..760a4f4b15a02f9cbb7a368961286ae3
|
|||||||
+ */ // Plazma - Completely remove Mojang's Profiler
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 7efe0fc559463bf84fc9d7f66339d096993bcb43..694fe048daec091ac1ebd372cfc3db0d8da731fa 100644
|
index 37120fcb31f4c9a90be37db252b17eb93db2cb0f..8764e00de0ae8730bf1f12414f431d6cf75613b8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -26,7 +26,7 @@ import net.minecraft.network.FriendlyByteBuf;
|
@@ -26,7 +26,7 @@ import net.minecraft.network.FriendlyByteBuf;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Reduce create random instance
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index be39e6292e4d6571f3b8a92358e35f9496ec8cde..cbbf9f5c775850301a012c613257ca7a8a134f1c 100644
|
index d1dec1a4671f59fb1b7fe6a2188bd7581a33e40e..ee5914eddb70adbda4c24b7c31fc4ca34ce06005 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -235,6 +235,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -235,6 +235,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
@@ -191,7 +191,7 @@ index f5e84bf8817e2d53557e0909d8c9e0e0e8206a16..1792f18397d733d87ef067a7daaf076b
|
|||||||
this.hitPlayers = Maps.newHashMap();
|
this.hitPlayers = Maps.newHashMap();
|
||||||
this.level = world;
|
this.level = world;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 648b21e3a83e0c35be739bd4ebfa930b84b1e4dd..9e8faa787fe3f924da898244a00eb3da3354d68b 100644
|
index 11a92adbcc97233f10cbe2547352213e92d0a09c..0857723b627c54e1992647c3d605809675397bc5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -121,16 +121,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -121,16 +121,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
@@ -293,10 +293,10 @@ index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb81
|
|||||||
// Paper start - Expose firework item directly
|
// Paper start - Expose firework item directly
|
||||||
// ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
|
// ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
index fa01da3de63db24b069d7888283650394bf4af83..84cf49f58560dd460ebb5cc1c014dd8afc95993d 100644
|
index e725f6e8205976a7b137aefb98b874cf4ae14893..dad5379066140b1eadab0a283cc7d8c019d8f4b6 100644
|
||||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
@@ -106,6 +106,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -65,6 +65,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
public Miscellaneous misc;
|
public Miscellaneous misc;
|
||||||
public class Miscellaneous extends ConfigurationPart {
|
public class Miscellaneous extends ConfigurationPart {
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ index 17da915ffa638500a83b67db0940a7b9a9b333a1..27a112818c000f4e649f044b7960ca98
|
|||||||
net.minecraft.world.level.Level level = this.getLevel();
|
net.minecraft.world.level.Level level = this.getLevel();
|
||||||
BlockPos blockPos = this.getBlockPos();
|
BlockPos blockPos = this.getBlockPos();
|
||||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
index 84cf49f58560dd460ebb5cc1c014dd8afc95993d..ced52ebf92cb751f911fa5f1c94880f5583ba8ee 100644
|
index dad5379066140b1eadab0a283cc7d8c019d8f4b6..ce327358e12388f123ee485948f87bc132243e5e 100644
|
||||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||||
@@ -108,6 +108,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -67,6 +67,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
|
|
||||||
public boolean reduceRandom = OPTIMIZE;
|
public boolean reduceRandom = OPTIMIZE;
|
||||||
public boolean ignoreThreadSafeRandom = false;
|
public boolean ignoreThreadSafeRandom = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user