Skip to content

Commit

Permalink
Updated Upstream (Purpur)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@3239393: add config for startup commands
  • Loading branch information
github-actions[bot] committed May 8, 2024
1 parent 6123e40 commit 386d064
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 47 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ pufferfishBranch = ver/1.20
usePufferfish = false

paperCommit = eee55d019fe80372c2e08ccd1d0a94c066cda926
purpurCommit = 117ed5fcafe0db7048805c27ff003565dc94dd79
purpurCommit = 3239393f3f11606bb4a850605a745a6d029f0f14
2 changes: 1 addition & 1 deletion patches/api/0001-Purpur-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <[email protected]>
Date: Wed, 8 May 2024 02:02:21 +0000
Date: Wed, 8 May 2024 03:47:13 +0000
Subject: [PATCH] Purpur API Changes

PurpurMC
Expand Down
87 changes: 58 additions & 29 deletions patches/server/0001-Purpur-Server-Changes.patch

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions patches/server/0009-Port-SparklyPaper-patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ index f164256d59b761264876ca0c85f812d101bfd5de..deaeb134c47da8710afa747bf980bd00
final TrackedChunk chunk = this.byChunk.get(CoordinateUtils.getChunkKey(chunkX, chunkZ));

diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index aa02d9390a90e235476a25db31c915668ebc0ec9..dc64018795a213d6ddbdf2cff465108eff466d55 100644
index c30bc456caf25fa07dc870eb544469e6d1184169..2213f09a99ea832f59ba802d411f11abfdc8141b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -325,6 +325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -148,7 +148,7 @@ index aa02d9390a90e235476a25db31c915668ebc0ec9..dc64018795a213d6ddbdf2cff465108e

public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
@@ -1733,17 +1734,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1743,17 +1744,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
Expand All @@ -175,7 +175,7 @@ index aa02d9390a90e235476a25db31c915668ebc0ec9..dc64018795a213d6ddbdf2cff465108e
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
//this.profiler.push("commandFunctions"); // Purpur
@@ -1810,7 +1809,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1820,7 +1819,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

try {
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
Expand Down
18 changes: 9 additions & 9 deletions patches/server/0015-Completely-remove-Mojang-Profiler.patch
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..467e17bfce31d0919d603698c9d88a04
public int forkLimit() {
return this.forkLimit;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0ab7f7e72 100644
index 2213f09a99ea832f59ba802d411f11abfdc8141b..ecf2f3fb8bd62fca7552da8704752db96b287920 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -104,18 +104,18 @@ import net.minecraft.util.datafix.DataFixers;
Expand Down Expand Up @@ -120,7 +120,7 @@ index dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@Nullable
@@ -2586,10 +2586,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2596,10 +2596,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

Expand All @@ -133,15 +133,15 @@ index dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0

public abstract boolean isSingleplayerOwner(GameProfile profile);

@@ -2833,6 +2835,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2843,6 +2845,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end

+ /* // Plazma - Completely remove Mojang's Profiler
private void startMetricsRecordingTick() {
if (false && this.willStartRecordingMetrics) { // Purpur
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
@@ -2859,12 +2862,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2869,12 +2872,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

public void startRecordingMetrics(Consumer<ProfileResults> resultConsumer, Consumer<Path> dumpConsumer) {
Expand All @@ -156,39 +156,39 @@ index dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0
}

public void stopRecordingMetrics() {
@@ -2879,6 +2882,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2889,6 +2892,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//this.metricsRecorder.cancel(); // Purpur
//this.profiler = this.metricsRecorder.getProfiler(); // Purpur
}
+ */ // Plazma - Completely remove Mojang's Profiler

public Path getWorldPath(LevelResource worldSavePath) {
return this.storageSource.getLevelPath(worldSavePath);
@@ -2929,6 +2933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2939,6 +2943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.isSaving;
}

+ /* // Plazma - Completely remove Mojang's Profiler
public boolean isTimeProfilerRunning() {
return false; //this.debugCommandProfilerDelayStart || this.debugCommandProfiler != null; // Purpur
}
@@ -2947,6 +2952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2957,6 +2962,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return methodprofilerresults;
}
}
+ */ // Plazma - Completely remove Mojang's Profiler

public int getMaxChainedNeighborUpdates() {
return 1000000;
@@ -2998,6 +3004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3008,6 +3014,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

+ /* // Plazma - Completely remove Mojang's Profiler
private static class TimeProfiler {

final long startNanos;
@@ -3047,6 +3054,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3057,6 +3064,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0033-Add-more-MSPT.patch
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ index 03be23690a94a14d7343526acad67ccf53b85c70..416c0a736edf47f76a37be0bc5fe8678
)
);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e460bbcdc370ef300e6c4fbbacb71fe6172c944c..33530e53634385bb0ebbf74ec819adc578193b28 100644
index b991365962585ab1cd23c4bf1250dc54ad07b4d0..553c90d0d6a5719493cd20ad9a132f460a9adb1b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -259,8 +259,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -108,7 +108,7 @@ index e460bbcdc370ef300e6c4fbbacb71fe6172c944c..33530e53634385bb0ebbf74ec819adc5
public final TickTimes tickTimes60s = new TickTimes(1200);
// Paper end - Add tick times API and /mspt command
@Nullable
@@ -1815,8 +1817,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1825,8 +1827,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.tick(shouldKeepTicking);
long after = Util.getNanos() - before;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Use Plazma logo instead if server favicon doesn't exist


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 33530e53634385bb0ebbf74ec819adc578193b28..180c4a12862ffaae217ec163ce622485496024d6 100644
index 553c90d0d6a5719493cd20ad9a132f460a9adb1b..ab36695fa53e074dac51dfd923448241aaca7170 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1549,29 +1549,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1559,29 +1559,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

private Optional<ServerStatus.Favicon> loadStatusIcon() {
Expand Down

0 comments on commit 386d064

Please sign in to comment.