Skip to content

Commit

Permalink
Update Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Spottedleaf committed Jan 16, 2025
1 parent 5198c2f commit 306dc07
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
7 changes: 1 addition & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.papermc.paperweight.tasks.RebuildGitPatches

plugins {
java // TODO java launcher tasks
id("io.papermc.paperweight.patcher") version "2.0.0-beta.13"
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
}

paperweight {
Expand All @@ -27,11 +27,6 @@ paperweight {
patchesDir = file("folia-api/paper-patches")
outputDir = file("paper-api")
}
patchDir("paperApiGenerator") {
upstreamPath = "paper-api-generator"
patchesDir = file("folia-api-generator/paper-patches")
outputDir = file("paper-api-generator")
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions folia-api/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -93,7 +_,7 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

-val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
+val generatedApiPath: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
idea {
module {
generatedSourceDirs.add(generatedApiPath.toFile())
@@ -103,6 +_,18 @@
main {
java {
Expand Down
6 changes: 1 addition & 5 deletions folia-server/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -20,6 +_,21 @@
@@ -20,6 +_,17 @@
minecraftVersion = providers.gradleProperty("mcVersion")
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
// gitFilePatches = true
Expand All @@ -15,10 +15,6 @@
+ }
+
+ activeFork = fork
+
+ paper {
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
+ }

spigot {
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -82,6 +_,11 @@
@@ -83,6 +_,11 @@
return this.apiScheduler;
};
// Paper end - Folia schedulers
Expand All @@ -12,7 +12,7 @@

public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
@@ -239,6 +_,11 @@
@@ -240,6 +_,11 @@

@Override
public boolean teleport(Location location, TeleportCause cause, io.papermc.paper.entity.TeleportFlag... flags) {
Expand All @@ -24,15 +24,15 @@
// Paper end
Preconditions.checkArgument(location != null, "location cannot be null");
location.checkFinite();
@@ -528,6 +_,7 @@
@@ -529,6 +_,7 @@
}

public Entity getHandle() {
+ ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
return this.entity;
}

@@ -722,7 +_,7 @@
@@ -723,7 +_,7 @@
ImmutableSet.Builder<Player> players = ImmutableSet.builder();

ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
Expand All @@ -41,7 +41,7 @@

if (entityTracker != null) {
for (ServerPlayerConnection connection : entityTracker.seenBy) {
@@ -1026,7 +_,7 @@
@@ -1027,7 +_,7 @@
}

ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
Expand All @@ -50,7 +50,7 @@

if (entityTracker == null) {
return;
@@ -1045,7 +_,7 @@
@@ -1046,7 +_,7 @@
}

ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
Expand All @@ -59,7 +59,7 @@

if (entityTracker == null) {
return;
@@ -1079,29 +_,43 @@
@@ -1080,29 +_,43 @@
location.checkFinite();
Location locationClone = location.clone(); // clone so we don't need to worry about mutations after this call.

Expand Down Expand Up @@ -122,7 +122,7 @@
}
// Paper end - more teleport API / async chunk API

@@ -1214,8 +_,7 @@
@@ -1215,8 +_,7 @@
// Paper start - tracked players API
@Override
public Set<org.bukkit.entity.Player> getTrackedPlayers() {
Expand Down
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=dev.folia
version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4

paperRef=8e80d4e15852ffbed1a18d1e9b34550191433200
paperRef=b1b88cd31687c5b3f80c4b0b51fd93a63b3e2498

org.gradle.configuration-cache=true
org.gradle.caching=true
Expand Down

0 comments on commit 306dc07

Please sign in to comment.