Skip to content

Commit e48800d

Browse files
committed
Update Paper
1 parent 602048c commit e48800d

7 files changed

Lines changed: 107 additions & 73 deletions

folia-server/build.gradle.kts.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"Build-Number" to (build ?: ""),
7272
"Build-Time" to buildTime.toString(),
7373
"Git-Branch" to gitBranch,
74-
@@ -326,7 +_,7 @@
74+
@@ -327,7 +_,7 @@
7575
}
7676

7777
fill {

folia-server/minecraft-patches/features/0001-Region-Threading-Base.patch

Lines changed: 77 additions & 52 deletions
Large diffs are not rendered by default.

folia-server/minecraft-patches/features/0006-Sync-vehicle-position-to-player-position-on-player-d.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This allows the player to be re-positioned before logging into
77
the world without causing thread checks to trip on Folia.
88

99
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
10-
index a17b622d15221e3936252f52868a855958bf2beb..fbe0ef19bfabfc42d9e0e08e17b08159321b3804 100644
10+
index ab2b55775fa7079dbf7bc32a4bc2d9281340f1a8..57f93d978fe48fdf6e77b7bfb9f1de060e1a8524 100644
1111
--- a/net/minecraft/server/level/ServerPlayer.java
1212
+++ b/net/minecraft/server/level/ServerPlayer.java
1313
@@ -729,8 +729,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc

folia-server/minecraft-patches/features/0009-Teleport-desynced-passengers-to-root-vehicle.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ index c6a4d52f76e10fcc57b2c49b07fbc2ef9bb90822..6f13870a1b463049dd37cf1c65d0bdec
3939
// Folia end - region threading
4040
//this.tickCount++; // Folia - region threading
4141
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
42-
index 2a8a7aeddffdfed31cd6e1162c0756986049fbab..a2b57f62b745dd21e215f919d335f14f5cb1706f 100644
42+
index e8204e243a3e038041a2e398fcea9c7d383638f9..07310ae30817fc88227355739074615969b48184 100644
4343
--- a/net/minecraft/world/entity/Entity.java
4444
+++ b/net/minecraft/world/entity/Entity.java
45-
@@ -4890,6 +4890,80 @@ public abstract class Entity
45+
@@ -4894,6 +4894,80 @@ public abstract class Entity
4646
return true;
4747
}
4848
// Folia end - region threading

folia-server/paper-patches/features/0001-Region-Threading-Base.patch

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,26 @@ index 85b8c1dcc5f988aaab367914e0aeee97f7cb3aed..933de1bf9a141a827f8655e812adc1b0
359359
}
360360
}
361361
diff --git a/src/main/java/io/papermc/paper/command/PaperCommands.java b/src/main/java/io/papermc/paper/command/PaperCommands.java
362-
index 6dfd0b1a85d518828b15158c01472ae4383b8882..cf9996228b320dd466de706928aa75df6df4340f 100644
362+
index e81dcd83d0e74969a7bab09ea09d349be5f0a741..963fcbf2b30b6c85d54f0a9888b0bf203fffdb38 100644
363363
--- a/src/main/java/io/papermc/paper/command/PaperCommands.java
364364
+++ b/src/main/java/io/papermc/paper/command/PaperCommands.java
365-
@@ -24,6 +24,7 @@ public final class PaperCommands {
365+
@@ -23,6 +23,7 @@ public final class PaperCommands {
366+
366367
public static void registerCommands(final MinecraftServer server) {
367368
COMMANDS.put("paper", new PaperCommand("paper"));
368-
COMMANDS.put("mspt", new MSPTCommand("mspt"));
369369
+ COMMANDS.put("tps", new io.papermc.paper.threadedregions.commands.CommandServerHealth()); // Folia - region threading
370370

371371
COMMANDS.forEach((s, command) -> {
372372
server.server.getCommandMap().register(s, "Paper", command);
373+
@@ -31,7 +32,7 @@ public final class PaperCommands {
374+
375+
public static void registerCommands() {
376+
// Paper commands go here
377+
- registerInternalCommand(PaperMSPTCommand.create(), "paper", PaperMSPTCommand.DESCRIPTION, List.of(), Set.of());
378+
+ //registerInternalCommand(PaperMSPTCommand.create(), "paper", PaperMSPTCommand.DESCRIPTION, List.of(), Set.of()); // Folia - region threading
379+
registerInternalCommand(PaperVersionCommand.create(), "bukkit", PaperVersionCommand.DESCRIPTION, List.of("ver", "about"), Set.of());
380+
registerInternalCommand(PaperPluginsCommand.create(), "bukkit", PaperPluginsCommand.DESCRIPTION, List.of("pl"), Set.of());
381+
}
373382
diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
374383
index a4212e9b0df55580b60666bc306d812d6f9531ba..4ea18bd448f211e13ff49d254a1edcfb77a653fb 100644
375384
--- a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
@@ -2184,10 +2193,10 @@ index 000c5ea5d39d5ab6e5592012ab1cc7ee547505dc..ab2ee478c53923be85f5a6d4971bed5b
21842193
}
21852194

21862195
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
2187-
index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03615abb1d 100644
2196+
index edf63e430b12e0f426b730e8df6ae7fb63258f9e..00749be3b16fd09c6b952c93631c808ff5657f20 100644
21882197
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
21892198
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
2190-
@@ -108,6 +108,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2199+
@@ -110,6 +110,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
21912200
return this.apiScheduler;
21922201
};
21932202
// Paper end - Folia schedulers
@@ -2199,15 +2208,15 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
21992208

22002209
public CraftEntity(final CraftServer server, final Entity entity) {
22012210
this.server = server;
2202-
@@ -142,6 +147,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2211+
@@ -144,6 +149,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22032212
}
22042213

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

2210-
@@ -296,6 +302,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2219+
@@ -298,6 +304,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22112220
}
22122221

22132222
protected boolean teleport0(Location location, TeleportCause cause, TeleportFlag... flags) {
@@ -2219,7 +2228,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
22192228
Entity entity = this.getHandle();
22202229
if (!entity.isAlive() || !entity.valid) {
22212230
return false;
2222-
@@ -742,7 +753,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2231+
@@ -747,7 +758,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22232232
ImmutableSet.Builder<Player> players = ImmutableSet.builder();
22242233

22252234
ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
@@ -2228,7 +2237,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
22282237

22292238
if (entityTracker != null) {
22302239
for (ServerPlayerConnection connection : entityTracker.seenBy) {
2231-
@@ -759,7 +770,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2240+
@@ -764,7 +775,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22322241
Preconditions.checkArgument(player != null, "Player cannot be null");
22332242

22342243
ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
@@ -2237,7 +2246,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
22372246
if (entityTracker == null) return false;
22382247

22392248
return entityTracker.seenBy.contains(((CraftPlayer) player).getHandle().connection);
2240-
@@ -1074,7 +1085,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2249+
@@ -1079,7 +1090,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22412250
}
22422251

22432252
ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
@@ -2246,7 +2255,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
22462255

22472256
if (entityTracker == null) {
22482257
return;
2249-
@@ -1091,7 +1102,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2258+
@@ -1096,7 +1107,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22502259
}
22512260

22522261
ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
@@ -2255,7 +2264,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
22552264

22562265
if (entityTracker == null) {
22572266
return;
2258-
@@ -1127,26 +1138,43 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2267+
@@ -1132,26 +1143,43 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
22592268
location.checkFinite();
22602269
Location locationClone = location.clone(); // clone so we don't need to worry about mutations after this call.
22612270

@@ -2317,7 +2326,7 @@ index e45f9514e4b593111e827a2fc083381aa8072f67..efcb8b97cd685e1243c770bf3e8daf03
23172326
}
23182327
// Paper end - more teleport API / async chunk API
23192328

2320-
@@ -1219,8 +1247,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2329+
@@ -1224,8 +1252,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
23212330

23222331
@Override
23232332
public Set<org.bukkit.entity.Player> getTrackedPlayers() {

folia-server/paper-patches/features/0005-Region-profiler.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ relative to the parent, exactly similar to the D field of Timers,
7777
where Y is the total number of times the counter is invoked.
7878

7979
diff --git a/src/main/java/io/papermc/paper/command/PaperCommands.java b/src/main/java/io/papermc/paper/command/PaperCommands.java
80-
index cf9996228b320dd466de706928aa75df6df4340f..3deca0b4e95609dc95376a86b5cbd525729a1031 100644
80+
index 963fcbf2b30b6c85d54f0a9888b0bf203fffdb38..6216147f4d4c04ba616375430a91232d5ebe838a 100644
8181
--- a/src/main/java/io/papermc/paper/command/PaperCommands.java
8282
+++ b/src/main/java/io/papermc/paper/command/PaperCommands.java
83-
@@ -25,6 +25,7 @@ public final class PaperCommands {
83+
@@ -24,6 +24,7 @@ public final class PaperCommands {
84+
public static void registerCommands(final MinecraftServer server) {
8485
COMMANDS.put("paper", new PaperCommand("paper"));
85-
COMMANDS.put("mspt", new MSPTCommand("mspt"));
8686
COMMANDS.put("tps", new io.papermc.paper.threadedregions.commands.CommandServerHealth()); // Folia - region threading
8787
+ COMMANDS.put("profiler", new io.papermc.paper.threadedregions.commands.CommandProfiler()); // Folia - region threading - profiler
8888

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mcVersion=26.2
55
apiVersion=26.2
66
channel=BETA
77

8-
paperRef=1569b8dc7646ba56a4040042eaeb870e76beee56
8+
paperRef=5563e58283f7771bd5ace9baad8b68614e37ad16
99

1010
org.gradle.configuration-cache=true
1111
org.gradle.caching=true

0 commit comments

Comments
 (0)