Skip to content

Commit

Permalink
#73 - 2 Patches remain
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed May 4, 2024
1 parent 491c491 commit a21f3ba
Show file tree
Hide file tree
Showing 7 changed files with 688 additions and 28 deletions.
10 changes: 8 additions & 2 deletions patches/server/0006-Setup-basic-configuration-sections.patch
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ index d8006ae086c18a4ef43906d516eba0d5fd397f5f..57d29f8f3bc89529db9ee8f6dc3fffdb
+
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..42d639688b6f0b9ff53debf49a920f5c8e232a19 100644
index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..8dce68cf7769fcd5ea03be32621ccb6bab174697 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -19,4 +19,32 @@ public class WorldConfigurations extends ConfigurationPart {
@@ -19,4 +19,38 @@ public class WorldConfigurations extends ConfigurationPart {
@Setting(Configuration.VERSION_FIELD)
int version = VERSION;

Expand Down Expand Up @@ -95,5 +95,11 @@ index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..42d639688b6f0b9ff53debf49a920f5c
+ }
+
+ }
+
+ public Block block;
+ public class Block extends ConfigurationPart {
+
+
+ }
+
}
668 changes: 661 additions & 7 deletions patches/server/0009-Port-SparklyPaper-patches.patch

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions patches/server/0013-Tweak-console-logging.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
index 9c830ec9129ac94aa08e914a82792210c13fc1a3..f7457660566d64a8149db414e005f0b8ed2202b5 100644
index 306b503737394a51407a03f7f5cb8f7bd4b0eea2..fa01da3de63db24b069d7888283650394bf4af83 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -67,4 +67,13 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -109,4 +109,13 @@ public class GlobalConfiguration extends ConfigurationPart {

}

Expand Down
22 changes: 11 additions & 11 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 2903c9a2480ac505f0931d29ac3c5013037e65f1..4a265c97ea872b178286394e2b8d2382166e4cf0 100644
index 5af9b69d58d5364e405f67257fd55fc5e89caa53..be39e6292e4d6571f3b8a92358e35f9496ec8cde 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 2903c9a2480ac505f0931d29ac3c5013037e65f1..4a265c97ea872b178286394e2b8d2382
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@Nullable
@@ -2577,10 +2577,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2576,10 +2576,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

Expand All @@ -133,15 +133,15 @@ index 2903c9a2480ac505f0931d29ac3c5013037e65f1..4a265c97ea872b178286394e2b8d2382

public abstract boolean isSingleplayerOwner(GameProfile profile);

@@ -2824,6 +2826,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2823,6 +2825,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) -> {
@@ -2850,12 +2853,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2849,12 +2852,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

public void startRecordingMetrics(Consumer<ProfileResults> resultConsumer, Consumer<Path> dumpConsumer) {
Expand All @@ -156,39 +156,39 @@ index 2903c9a2480ac505f0931d29ac3c5013037e65f1..4a265c97ea872b178286394e2b8d2382
}

public void stopRecordingMetrics() {
@@ -2870,6 +2873,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2869,6 +2872,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);
@@ -2920,6 +2924,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2919,6 +2923,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
}
@@ -2938,6 +2943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2937,6 +2942,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return methodprofilerresults;
}
}
+ */ // Plazma - Completely remove Mojang's Profiler

public int getMaxChainedNeighborUpdates() {
return 1000000;
@@ -2989,6 +2995,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2988,6 +2994,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

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

final long startNanos;
@@ -3038,6 +3045,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3037,6 +3044,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
Expand Down Expand Up @@ -379,7 +379,7 @@ index 361dc9c3434d9b4ac4b9966fa09b17f6820b0f22..705a71ca533ad9b6dab394c8cbcbb981
@Override
public SampleLogger getTickTimeLogger() {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 4e6fccec4f5ca14562bf5bae495ac36c14982d85..73c1f17f1e6fa63e98081304f8cbd336902d9ac6 100644
index 9162c6338dbb516ce60f4853e57da6e49be79282..809d74ce3a0b02538b1543346485731828a9f139 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
Expand All @@ -392,7 +392,7 @@ index 4e6fccec4f5ca14562bf5bae495ac36c14982d85..73c1f17f1e6fa63e98081304f8cbd336
import net.minecraft.util.thread.ProcessorHandle;
import net.minecraft.util.thread.ProcessorMailbox;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 476a04d87a61b021816d2970e86042bde32d95a2..fce8968087ddb951f3c154f28d567a42acafca7e 100644
index 53c0b48966558f43bb9bd7d29d9588f9d83e0de7..7ff845a0ddb308e8b69881f05086105f7f83e605 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -21,7 +21,7 @@ import net.minecraft.core.SectionPos;
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0017-Reduce-create-random-instance.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
index 4a265c97ea872b178286394e2b8d2382166e4cf0..f0f33f5aea9a9d7b4c9b761458d425f83e83f227 100644
index be39e6292e4d6571f3b8a92358e35f9496ec8cde..cbbf9f5c775850301a012c613257ca7a8a134f1c 100644
--- a/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
Expand Down Expand Up @@ -293,10 +293,10 @@ index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb81
// Paper start - Expose firework item directly
// 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
index f7457660566d64a8149db414e005f0b8ed2202b5..d922c572e2410fa1f719fe2371f65cd1542ca8b4 100644
index fa01da3de63db24b069d7888283650394bf4af83..84cf49f58560dd460ebb5cc1c014dd8afc95993d 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -64,6 +64,8 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -106,6 +106,8 @@ public class GlobalConfiguration extends ConfigurationPart {
public Miscellaneous misc;
public class Miscellaneous extends ConfigurationPart {

Expand All @@ -306,7 +306,7 @@ index f7457660566d64a8149db414e005f0b8ed2202b5..d922c572e2410fa1f719fe2371f65cd1
}

diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index 36728e206de513e071f387d36a608e70a5984a58..c8b10b3499fbdf41f0b268d8a9da729e3432bb66 100644
index b5b4229ccdecd63bd3e689e8247e44341d7c30cc..33544c734798d9fa1954c7806420f1e0b3653898 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -22,6 +22,7 @@ public class WorldConfigurations extends ConfigurationPart {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ index 17da915ffa638500a83b67db0940a7b9a9b333a1..27a112818c000f4e649f044b7960ca98
net.minecraft.world.level.Level level = this.getLevel();
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
index d922c572e2410fa1f719fe2371f65cd1542ca8b4..a060257a62da7ed02b342b426e18e5f02ecdbdc9 100644
index 84cf49f58560dd460ebb5cc1c014dd8afc95993d..ced52ebf92cb751f911fa5f1c94880f5583ba8ee 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -66,6 +66,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -108,6 +108,7 @@ public class GlobalConfiguration extends ConfigurationPart {

public boolean reduceRandom = OPTIMIZE;
public boolean ignoreThreadSafeRandom = false;
Expand Down

0 comments on commit a21f3ba

Please sign in to comment.