Skip to content

Commit

Permalink
Update upstream (yay finally)
Browse files Browse the repository at this point in the history
Not tested in production yet, but soon it will be
  • Loading branch information
MrPowerGamerBR committed Feb 18, 2024
1 parent a573948 commit 7a80199
Show file tree
Hide file tree
Showing 18 changed files with 307 additions and 791 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group=net.sparklypower.sparklypaper
version=1.20.4-R0.1-SNAPSHOT

mcVersion=1.20.4
paperRef=351923d17e3b5f2a2a3ed848c171d7d2b077a55a
paperRef=4939f8711884901ddf1c56337f606de71cdae78d

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 50cc3c1e5968d95a21133e4d554a93e181aba0f6..3f0c449c373c015c1cf10165ff402e29e82ac5de 100644
index 3b86451bdc939aec0ec6b4bf82a789cab38345b4..32fa3dbf6975b1435bbfc7bbd1094687b7e882f7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -20,7 +20,7 @@ minecraft {
Expand All @@ -14,6 +14,6 @@ index 50cc3c1e5968d95a21133e4d554a93e181aba0f6..3f0c449c373c015c1cf10165ff402e29
implementation("com.squareup:javapoet:1.13.0")
- implementation(project(":paper-api"))
+ implementation(project(":sparklypaper-api")) // SparklyPaper
implementation("io.github.classgraph:classgraph:4.8.47")
}

group = "io.papermc.paper"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ From: MrPowerGamerBR <[email protected]>
Date: Sat, 12 Jun 2021 16:40:34 +0200
Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 58da26ad2f128ba0b66f86820f60853f4be352f0..f2c2d7af8d3647879702c27e8a0ee62e76afd6e7 100644
--- a/build.gradle.kts
Expand All @@ -16,10 +15,10 @@ index 58da26ad2f128ba0b66f86820f60853f4be352f0..f2c2d7af8d3647879702c27e8a0ee62e
+ kotlin("plugin.serialization") version "1.9.10"
id("com.github.johnrengelman.shadow")
}

@@ -13,8 +15,15 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
val alsoShade: Configuration by configurations.creating

dependencies {
- implementation(project(":paper-api"))
- implementation(project(":paper-mojangapi"))
Expand Down Expand Up @@ -66,23 +65,23 @@ index 58da26ad2f128ba0b66f86820f60853f4be352f0..f2c2d7af8d3647879702c27e8a0ee62e
standardInput = System.`in`
workingDir = rootProject.layout.projectDirectory
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..f1c65967b74e79452870438eea0942cc700fe0e9 100644
index d06185566b447c432d4dc2e3ba04d121bcdbc71b..8f250966ab5e4576e3a57beba2e417d53713e84e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1866,7 +1866,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1855,7 +1855,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "SparklyPaper"; // SparklyPaper - SparklyPaper > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
- return "Paper"; // Paper
+ return "SparklyPaper"; // SparklyPaper // "Paper"; // Paper
}

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e011cfcdda2e0a609d4158b0454bdf046b04c9d9..3b28e079dcfba5ca3de2aad903f95c142e73e6a3 100644
index 9f7ed337463cc9bb370a5541d9de5cd8f9c1a78a..404e5715a43068fb3338e7bcef52f8967e1e4bb4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
@@ -266,7 +266,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand All @@ -105,7 +104,7 @@ index 774556a62eb240da42e84db4502e2ed43495be17..22e504565de83f976c8b2996f0b2207b

if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 40dcdf6885e99b26283a9ea2bd4d4bf6ec358e71..d502b0d45bc950a586049dd5cd242319da5ba721 100644
index 9e638f72f180ff5ef63ec3dd6cf548c53f7bd4a5..7de20ceb7ba52178b1939deb01dbe3d51a52dfb0 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
Expand All @@ -126,12 +125,12 @@ index 40dcdf6885e99b26283a9ea2bd4d4bf6ec358e71..d502b0d45bc950a586049dd5cd242319
//
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
{
@@ -190,7 +190,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
@@ -189,7 +189,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
}
// Paper end - Different message for short timeout
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to SparklyPaper!):" ); // SparklyPaper - branding changes // Paper
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper - rewrite chunk system
this.dumpTickingInfo(); // Paper - log detailed tick information
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
38 changes: 19 additions & 19 deletions patches/server/0002-SparklyPaper-config-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Subject: [PATCH] SparklyPaper config files


diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 58536aabf607015939a1326f80207c0a06eed8ff..b69860955a6c1efb68b17e1fc9b0c42771f40e15 100644
index 68d268b6fff126e8645b6deec3fb549ea2286b77..d61cf0d713dcdef5a7081142838ee6960593fe95 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -218,6 +218,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this);
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
@@ -219,6 +219,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
+ // SparklyPaper start
+ try {
+ net.sparklypower.sparklypaper.configs.SparklyPaperConfigUtils.INSTANCE.init((java.io.File) options.valueOf("sparklypaper-settings"));
Expand All @@ -21,25 +21,25 @@ index 58536aabf607015939a1326f80207c0a06eed8ff..b69860955a6c1efb68b17e1fc9b0c427
+ }
+ net.sparklypower.sparklypaper.SparklyPaperCommands.INSTANCE.registerCommands(this);
+ // SparklyPaper end
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
// Paper end
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // Paper - init PaperBrigadierProvider

diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0b56e5f7f18fc4286992af22d402205b771165a3..f5e3c87581cbdc762806ad4412b68d3c84612b88 100644
index 19f23a6c8fb5c02843c27fb8a242ec9d0d1b538b..e199c852f4c493dbe6ab776d18b91a53e5a36f7c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -179,6 +179,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end
@@ -173,6 +173,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end - add paper world config

public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
+ public net.sparklypower.sparklypaper.configs.SparklyPaperWorldConfig sparklyPaperConfig; // SparklyPaper
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -216,6 +217,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
@@ -210,6 +211,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.sparklyPaperConfig = net.sparklypower.sparklypaper.configs.SparklyPaperConfigUtils.INSTANCE.getWorldSettings(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // SparklyPaper
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
Expand Down Expand Up @@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..bc0ec96f91f7c9ab9f9a865a50f69707
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3b28e079dcfba5ca3de2aad903f95c142e73e6a3..64044cb5888c72797c369b5d015297677b20419a 100644
index 404e5715a43068fb3338e7bcef52f8967e1e4bb4..3754360b3be729e7fa03697543e219506a5499b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -112,6 +112,7 @@ import net.minecraft.world.level.storage.PrimaryLevelData;
Expand All @@ -127,23 +127,23 @@ index 3b28e079dcfba5ca3de2aad903f95c142e73e6a3..64044cb5888c72797c369b5d01529767
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -1037,6 +1038,7 @@ public final class CraftServer implements Server {
@@ -1054,6 +1055,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ net.sparklypower.sparklypaper.configs.SparklyPaperConfigUtils.INSTANCE.init((File) console.options.valueOf("sparklypaper-settings")); // SparklyPaper
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))
@@ -1052,6 +1054,7 @@ public final class CraftServer implements Server {
@@ -1069,6 +1071,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.sparklyPaperConfig = SparklyPaperConfigUtils.INSTANCE.getWorldSettings(world.serverLevelData.getLevelName()); // SparklyPaper
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1067,6 +1070,7 @@ public final class CraftServer implements Server {
@@ -1084,6 +1087,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
Expand All @@ -152,7 +152,7 @@ index 3b28e079dcfba5ca3de2aad903f95c142e73e6a3..64044cb5888c72797c369b5d01529767
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index a74a8a027c99eef199c1a6a54232ac2c8ffb9d08..73a358912fccd70b350d75e857a2affc5480473a 100644
index ce341f42b3a5e17fb6d1f7de8057e73137ae2a6e..8851fd0dbca2d788b16dec92a121ad00f209459a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -174,6 +174,14 @@ public class Main {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0003-Optimize-entity-coordinate-key.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data is already available in the blockPosition struct, so we use that
instead of re-doing the casting.

diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index 200ed770b57e1a9240abf0473968d4b85cbefe3c..0acc7cfc0fb0264dd76a58f7582e79d83fa040eb 100644
index 850f75172e9efa72cabb8e5bd124b96a0b1a945f..3db1de70c76e1427e257d988d1a7f26e986b5617 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -212,7 +212,7 @@ public final class MCUtil {
Expand All @@ -24,10 +24,10 @@ index 200ed770b57e1a9240abf0473968d4b85cbefe3c..0acc7cfc0fb0264dd76a58f7582e79d8

public static long getCoordinateKey(final ChunkPos pair) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0c46a4aeafd03fbbfd590b0362d41bf2b1d5ca74..aa6045039450c4cce8d9481aa7f56867dd15c0fa 100644
index 906eded9a2ab61737a30cfe89292a71237ce4eb7..b0b9e07da81ca0c2a0e915afbcd1a50a39e3bf20 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -307,7 +307,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -308,7 +308,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public double yo;
public double zo;
private Vec3 position;
Expand Down
Loading

0 comments on commit 7a80199

Please sign in to comment.