Skip to content

Commit

Permalink
Update Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Spottedleaf committed Jan 14, 2025
1 parent 7dbde1d commit 5198c2f
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 78 deletions.
27 changes: 14 additions & 13 deletions folia-server/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -21,8 +_,19 @@
@@ -20,6 +_,21 @@
minecraftVersion = providers.gradleProperty("mcVersion")
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
// gitFilePatches = true

+
+ val fork = forks.register("folia") {
+ upstream.patchDir("paperServer") {
+ upstreamPath = "paper-server"
Expand All @@ -14,14 +15,14 @@
+ }
+
+ activeFork = fork
+
paper {
- reobfMappingsPatch = layout.projectDirectory.file("../build-data/reobf-mappings-patch.tiny")
+
+ paper {
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
}
+ }

spigot {
@@ -105,7 +_,20 @@
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
@@ -101,7 +_,20 @@
}
}

Expand All @@ -43,7 +44,7 @@
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
extendsFrom(configurations.compileClasspath.get())
}
@@ -123,7 +_,7 @@
@@ -119,7 +_,7 @@
}

dependencies {
Expand All @@ -52,22 +53,22 @@
implementation("ca.spottedleaf:concurrentutil:0.0.3")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -192,14 +_,14 @@
@@ -188,14 +_,14 @@
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
- "Implementation-Title" to "Paper",
+ "Implementation-Title" to "Folia", // Folia
+ "Implementation-Title" to "Folia",
"Implementation-Version" to implementationVersion,
"Implementation-Vendor" to date,
- "Specification-Title" to "Paper",
+ "Specification-Title" to "Folia", // Folia
+ "Specification-Title" to "Folia",
"Specification-Version" to project.version,
"Specification-Vendor" to "Paper Team",
- "Brand-Id" to "papermc:paper",
- "Brand-Name" to "Paper",
+ "Brand-Id" to "papermc:folia", // Folia
+ "Brand-Name" to "Folia", // Folia
+ "Brand-Id" to "papermc:folia",
+ "Brand-Name" to "Folia",
"Build-Number" to (build ?: ""),
"Build-Time" to buildTime.toString(),
"Git-Branch" to gitBranch,
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
this.player = this.server.getPlayerList().respawn(this.player, false, Entity.RemovalReason.KILLED, RespawnReason.DEATH); // CraftBukkit
this.resetPosition();
if (this.server.isHardcore()) {
@@ -3413,7 +_,21 @@
@@ -3441,7 +_,21 @@
}
List<String> list = Stream.of(lines).map(ChatFormatting::stripFormatting).collect(Collectors.toList());
// Paper end - Limit client sign length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}
}

@@ -451,7 +_,7 @@
@@ -454,7 +_,7 @@
@Override
public boolean mayInteract(ServerLevel level, BlockPos pos) {
Entity owner = this.getOwner();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -396,4 +_,17 @@
@@ -395,4 +_,17 @@
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -315,7 +_,7 @@
@@ -316,7 +_,7 @@
public final io.papermc.paper.SparksFly spark; // Paper - spark

// Paper start - Folia region threading API
Expand All @@ -9,7 +9,7 @@
private final io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler asyncScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler();
private final io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler globalRegionScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler();

@@ -392,7 +_,7 @@
@@ -393,7 +_,7 @@

@Override
public final boolean isGlobalTickThread() {
Expand All @@ -18,7 +18,7 @@
}
// Paper end - Folia reagion threading API

@@ -987,6 +_,9 @@
@@ -988,6 +_,9 @@

// NOTE: Should only be called from DedicatedServer.ah()
public boolean dispatchServerCommand(CommandSender sender, ConsoleInput serverCommand) {
Expand All @@ -28,7 +28,7 @@
if (sender instanceof Conversable) {
Conversable conversable = (Conversable) sender;

@@ -1006,12 +_,46 @@
@@ -1007,12 +_,46 @@
}
}

Expand Down Expand Up @@ -75,23 +75,23 @@
if (this.commandMap.dispatch(sender, commandLine)) {
return true;
}
@@ -1283,6 +_,7 @@
@@ -1284,6 +_,7 @@

@Override
public World createWorld(WorldCreator creator) {
+ if (true) throw new UnsupportedOperationException(); // Folia - not implemented properly yet
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
@@ -1480,6 +_,7 @@
@@ -1481,6 +_,7 @@

@Override
public boolean unloadWorld(World world, boolean save) {
+ if (true) throw new UnsupportedOperationException(); // Folia - not implemented properly yet
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot unload a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
if (world == null) {
return false;
@@ -3252,7 +_,7 @@
@@ -3258,7 +_,7 @@

@Override
public int getCurrentTick() {
Expand Down
Loading

0 comments on commit 5198c2f

Please sign in to comment.