Skip to content

Commit 6203419

Browse files
committed
Update to 26.2
1 parent 62dc0f2 commit 6203419

17 files changed

Lines changed: 1940 additions & 2606 deletions

folia-api/build.gradle.kts.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/paper-api/build.gradle.kts
22
+++ b/paper-api/build.gradle.kts
3-
@@ -91,7 +_,7 @@
3+
@@ -94,7 +_,7 @@
44
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
55
}
66

@@ -9,7 +9,7 @@
99
idea {
1010
module {
1111
generatedSourceDirs.add(generatedDir.toFile())
12-
@@ -101,6 +_,18 @@
12+
@@ -104,6 +_,18 @@
1313
main {
1414
java {
1515
srcDir(generatedDir)
@@ -28,7 +28,7 @@
2828
}
2929
}
3030
}
31-
@@ -183,7 +_,7 @@
31+
@@ -186,7 +_,7 @@
3232

3333
tasks.withType<Javadoc>().configureEach {
3434
val options = options as StandardJavadocDocletOptions
@@ -37,7 +37,7 @@
3737
options.use()
3838
options.isDocFilesSubDirs = true
3939
options.links(
40-
@@ -217,11 +_,11 @@
40+
@@ -213,11 +_,11 @@
4141
}
4242

4343
// workaround for https://github.com/gradle/gradle/issues/4046

folia-api/paper-patches/features/0004-Add-TPS-From-Region.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: [PATCH] Add TPS From Region
55

66

77
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
8-
index de21023e1e0ea9d22f6beb8ef50715809c10058a..550c7eef69acde07c05b0cb75bf413186c09a26a 100644
8+
index d083e3e5f00aac3e5c48a248cae665f3517a4b4a..8a24b84db656da4cec59e9bccac306467c8155b0 100644
99
--- a/src/main/java/org/bukkit/Bukkit.java
1010
+++ b/src/main/java/org/bukkit/Bukkit.java
11-
@@ -2990,6 +2990,42 @@ public final class Bukkit {
11+
@@ -2994,6 +2994,42 @@ public final class Bukkit {
1212
return server.isGlobalTickThread();
1313
}
1414
// Paper end - Folia region threading API
@@ -52,10 +52,10 @@ index de21023e1e0ea9d22f6beb8ef50715809c10058a..550c7eef69acde07c05b0cb75bf41318
5252
/**
5353
* @deprecated All methods on this class have been deprecated, see the individual methods for replacements.
5454
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
55-
index dd8ad5976eb413f049245a4f37bd94b3e41829de..23901bb9e01a90dc5f12e458b7188d51e91022b4 100644
55+
index 62341f72e8457c5547994bee1f3fda9faade6ce0..fb5ca3ab0ddba433a39e65572beeb955b50d6f72 100644
5656
--- a/src/main/java/org/bukkit/Server.java
5757
+++ b/src/main/java/org/bukkit/Server.java
58-
@@ -2780,4 +2780,34 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
58+
@@ -2776,4 +2776,34 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
5959
*/
6060
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
6161
// Paper end - API to check if the server is sleeping

folia-server/build.gradle.kts.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
+
2121
+
2222
updatingMinecraft {
23-
// oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
23+
// oldPaperCommit = "d4fe85375af18bfa88f44d7c1e6a61904ae550cc"
2424
}
2525
@@ -86,7 +_,19 @@
2626
}
@@ -49,7 +49,7 @@
4949
dependencies {
5050
- implementation(project(":paper-api"))
5151
+ implementation(project(":folia-api"))
52-
implementation("ca.spottedleaf:concurrentutil:0.0.10")
52+
implementation("ca.spottedleaf:leafpile:1.0.0")
5353
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
5454
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
5555
@@ -171,14 +_,14 @@

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

Lines changed: 1586 additions & 1678 deletions
Large diffs are not rendered by default.

folia-server/minecraft-patches/features/0002-Max-pending-logins.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Subject: [PATCH] Max pending logins
66
Should help the floodgates on launch
77

88
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
9-
index 282fae3104687119cb9e9502bcb3d211950e4571..d924369285878ff73811b8186cdb16e76f5dda90 100644
9+
index c96c38d3fe7c48a4c9e02bfe7daef006cb4eeafa..f2329d1a9d9d4bf4c9d771e25e54f2f9ef65a76c 100644
1010
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
1111
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
1212
@@ -98,7 +98,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -19,10 +19,10 @@ index 282fae3104687119cb9e9502bcb3d211950e4571..d924369285878ff73811b8186cdb16e7
1919

2020
if (this.state == ServerLoginPacketListenerImpl.State.WAITING_FOR_DUPE_DISCONNECT
2121
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
22-
index 7de3f5694185ae26439a8262224a9e600475e7bb..36dc653df87c501c6d1d65769c5be264beee58d2 100644
22+
index 70e1b8b84b90a5ae3d3cf3549dffa87cc4b442ac..abded55cb8b695eb33a1894284a63887547c7a75 100644
2323
--- a/net/minecraft/server/players/PlayerList.java
2424
+++ b/net/minecraft/server/players/PlayerList.java
25-
@@ -150,6 +150,17 @@ public abstract class PlayerList {
25+
@@ -149,6 +149,17 @@ public abstract class PlayerList {
2626
conflictingId = this.connectionById.get(byId);
2727

2828
if (conflictingName == null && conflictingId == null) {

folia-server/minecraft-patches/features/0003-Add-chunk-system-throughput-counters-to-tps.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ index 96ccb8f657d755b2e58a8dd0cda00ca0df4886b2..fd48134ab73d3096bc86402b4eb393c8
5858
chunk = wrappedFull.getWrapped();
5959
} else {
6060
diff --git a/io/papermc/paper/threadedregions/commands/CommandServerHealth.java b/io/papermc/paper/threadedregions/commands/CommandServerHealth.java
61-
index a80983c10fe39db500512b88442b9b3c30d03b12..7826c50b7c7c59e148905337ddc0dc8085f3f7c1 100644
61+
index d362c9b19a82b8e87bb52497729a9ff134574b1c..aa860cfe9de616f185163fe74e0f4f49bd13a805 100644
6262
--- a/io/papermc/paper/threadedregions/commands/CommandServerHealth.java
6363
+++ b/io/papermc/paper/threadedregions/commands/CommandServerHealth.java
64-
@@ -169,6 +169,9 @@ public final class CommandServerHealth extends Command {
64+
@@ -170,6 +170,9 @@ public final class CommandServerHealth extends Command {
6565
totalUtil += (report == null ? 0.0 : report.utilisation());
6666
}
6767

@@ -71,7 +71,7 @@ index a80983c10fe39db500512b88442b9b3c30d03b12..7826c50b7c7c59e148905337ddc0dc80
7171
totalUtil += globalTickReport.utilisation();
7272

7373
tpsByRegion.sort(null);
74-
@@ -283,6 +286,12 @@ public final class CommandServerHealth extends Command {
74+
@@ -284,6 +287,12 @@ public final class CommandServerHealth extends Command {
7575
.append(Component.text(ONE_DECIMAL_PLACES.get().format(maxThreadCount * 100.0), INFORMATION))
7676
.append(Component.text("%\n", PRIMARY))
7777

folia-server/minecraft-patches/features/0004-Prevent-block-updates-in-non-loaded-or-non-owned-chu.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ add explicit block update suppression techniques, it's better
99
than the server crashing.
1010

1111
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
12-
index ff2622f007cf61028447523bbec0ec6076609923..d90edfdd7a7c0c1b31254fe1de19a91a66513d11 100644
12+
index faec81c45af77876ebdb33eb8395c2a33115c415..a8401a953a955a69f39fa13e9678d177796889f0 100644
1313
--- a/net/minecraft/world/level/Level.java
1414
+++ b/net/minecraft/world/level/Level.java
15-
@@ -2110,7 +2110,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
15+
@@ -2118,7 +2118,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
1616
public void updateNeighbourForOutputSignal(final BlockPos pos, final Block changedBlock) {
1717
for (Direction direction : Direction.Plane.HORIZONTAL) {
1818
BlockPos relativePos = pos.relative(direction);
@@ -22,7 +22,7 @@ index ff2622f007cf61028447523bbec0ec6076609923..d90edfdd7a7c0c1b31254fe1de19a91a
2222
if (state.is(Blocks.COMPARATOR)) {
2323
this.neighborChanged(state, relativePos, changedBlock, null, false);
2424
diff --git a/net/minecraft/world/level/block/DetectorRailBlock.java b/net/minecraft/world/level/block/DetectorRailBlock.java
25-
index 5f09b65c6986579047662436d3ec4251338f55b3..ed718d3046e11c0652f0a5bb543bba4006e003c5 100644
25+
index 0caf401ef2e4f8646e429a476993ba06ee405445..816d9c71c26b5f08435bc4fdefe92af6592d5eb4 100644
2626
--- a/net/minecraft/world/level/block/DetectorRailBlock.java
2727
+++ b/net/minecraft/world/level/block/DetectorRailBlock.java
2828
@@ -134,8 +134,8 @@ public class DetectorRailBlock extends BaseRailBlock {
@@ -37,7 +37,7 @@ index 5f09b65c6986579047662436d3ec4251338f55b3..ed718d3046e11c0652f0a5bb543bba40
3737
}
3838

3939
diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java
40-
index a03cc9176f98b30054701e03b51b8c054a6a0e3a..8571a2d238281f6791fe4bcaf9b5722c6c0cb01d 100644
40+
index 03c878a4f539e290dda30adcf5a375199be6e676..36f10c676db121dc1f9cebe85eadfd920d26de7d 100644
4141
--- a/net/minecraft/world/level/block/PoweredRailBlock.java
4242
+++ b/net/minecraft/world/level/block/PoweredRailBlock.java
4343
@@ -102,8 +102,8 @@ public class PoweredRailBlock extends BaseRailBlock {
@@ -49,10 +49,10 @@ index a03cc9176f98b30054701e03b51b8c054a6a0e3a..8571a2d238281f6791fe4bcaf9b5722c
4949
+ BlockState state = !ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(level, pos, 25) ? null : level.getBlockStateIfLoaded(pos);
5050
+ if (state == null || !state.is(this)) { // Folia - block updates in unloaded chunks
5151
return false;
52-
} else {
53-
RailShape myShape = state.getValue(SHAPE);
52+
}
53+
5454
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
55-
index 4f6205c6d75f195cafb756adbcaee683c7d6761b..759eb347299813c20226cc2fc5dc7718d12b7f56 100644
55+
index ba408de343d6fe8a2d88a6e4a644d102a16a298e..957c45b39e9d6f74fb9791ecd121b0e2bd6bc732 100644
5656
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
5757
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
5858
@@ -215,8 +215,9 @@ public class RedStoneWireBlock extends Block {
@@ -67,7 +67,7 @@ index 4f6205c6d75f195cafb756adbcaee683c7d6761b..759eb347299813c20226cc2fc5dc7718
6767
BlockState blockStateDown = level.getBlockState(blockPos);
6868
if (blockStateDown.is(this)) {
6969
diff --git a/net/minecraft/world/level/block/TripWireBlock.java b/net/minecraft/world/level/block/TripWireBlock.java
70-
index 83823edc4a943e006e3237ecb9198a571a681873..04e5995409a3532947dfab1c8ef05bd546a6f66d 100644
70+
index 49510dc0ef82621953be8e485708872bd8b2b88b..e19a82ebb7b3be71e51ac28914de58fab32a708e 100644
7171
--- a/net/minecraft/world/level/block/TripWireBlock.java
7272
+++ b/net/minecraft/world/level/block/TripWireBlock.java
7373
@@ -131,6 +131,7 @@ public class TripWireBlock extends Block {
@@ -79,7 +79,7 @@ index 83823edc4a943e006e3237ecb9198a571a681873..04e5995409a3532947dfab1c8ef05bd5
7979
if (block.is(this.hook)) {
8080
if (block.getValue(TripWireHookBlock.FACING) == direction.getOpposite()) {
8181
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
82-
index 31f8b7225ae5804ed66e7b17862ee56ac6ae5237..82713a22a7c9c54c64616cbd96aac9dfb10cf4e3 100644
82+
index 9d08ce61f964bb3115c708091549a233dabcf0e3..8bcc8b6f83ab4d5a472741185511b5d84f4974be 100644
8383
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
8484
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
8585
@@ -128,6 +128,7 @@ public class TripWireHookBlock extends Block {
@@ -91,10 +91,10 @@ index 31f8b7225ae5804ed66e7b17862ee56ac6ae5237..82713a22a7c9c54c64616cbd96aac9df
9191
if (wireState.is(Blocks.TRIPWIRE_HOOK)) {
9292
if (wireState.getValue(FACING) == direction.getOpposite()) {
9393
diff --git a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
94-
index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557cabbd4b037 100644
94+
index 4c3336fde3a82b8d41b47ade89e80add295940b2..16a0a789b930ec4fb92a03bc8f25e98053f0773a 100644
9595
--- a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
9696
+++ b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
97-
@@ -147,7 +147,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
97+
@@ -149,7 +149,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
9898
public boolean runNext(final Level level) {
9999
Direction direction = NeighborUpdater.UPDATE_ORDER[this.idx++];
100100
BlockPos neighborPos = this.sourcePos.relative(direction);
@@ -104,15 +104,15 @@ index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557ca
104104
Orientation orientation = null;
105105
if (level.enabledFeatures().contains(FeatureFlags.REDSTONE_EXPERIMENTS)) {
106106
if (this.orientation == null) {
107-
@@ -160,6 +161,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
107+
@@ -162,6 +163,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
108108
}
109109

110110
NeighborUpdater.executeUpdate(level, state, neighborPos, this.sourceBlock, orientation, false, this.sourcePos); // Paper - Add source block to BlockPhysicsEvent
111111
+ } // Folia - block updates in unloaded chunks
112112
if (this.idx < NeighborUpdater.UPDATE_ORDER.length && NeighborUpdater.UPDATE_ORDER[this.idx] == this.skipDirection) {
113113
this.idx++;
114114
}
115-
@@ -189,7 +191,9 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
115+
@@ -191,7 +193,9 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
116116
) implements CollectingNeighborUpdater.NeighborUpdates {
117117
@Override
118118
public boolean runNext(final Level level) {
@@ -122,8 +122,8 @@ index 3d8c7590740495fbdf8686bcae7c0e57ed92bcea..d805f0d1e8d25069c986b973eed557ca
122122
return false;
123123
}
124124

125-
@@ -202,8 +206,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
126-
record SimpleNeighborUpdate(BlockPos pos, Block block, @Nullable Orientation orientation) implements CollectingNeighborUpdater.NeighborUpdates {
125+
@@ -204,8 +208,8 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
126+
private record SimpleNeighborUpdate(BlockPos pos, Block block, @Nullable Orientation orientation) implements CollectingNeighborUpdater.NeighborUpdates {
127127
@Override
128128
public boolean runNext(final Level level) {
129129
- BlockState state = level.getBlockState(this.pos);

folia-server/minecraft-patches/features/0005-Block-reading-in-world-tile-entities-on-worldgen-thr.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The returned TE may be in the world, in which case it is unsafe
77
for the current thread to modify or access its contents.
88

99
diff --git a/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/net/minecraft/world/level/chunk/ImposterProtoChunk.java
10-
index 94652b00e18ffcbe02f1ad0578d671e2a1d1d16a..ebfc72d730687945639e131a8e8fe02a965280a2 100644
10+
index 754c3bb648558d96f9eed990a41480e4366bd72f..3e6fbef8466c02ca93b6eaa39481effbe87a2910 100644
1111
--- a/net/minecraft/world/level/chunk/ImposterProtoChunk.java
1212
+++ b/net/minecraft/world/level/chunk/ImposterProtoChunk.java
1313
@@ -83,6 +83,11 @@ public class ImposterProtoChunk extends ProtoChunk implements ca.spottedleaf.moo

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ 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 45921b0c22dc35facd608b1c7644e5b9a03a97ec..5d4310dab55cc960ccfce279e656e7b740f3d5c0 100644
10+
index a17b622d15221e3936252f52868a855958bf2beb..fbe0ef19bfabfc42d9e0e08e17b08159321b3804 100644
1111
--- a/net/minecraft/server/level/ServerPlayer.java
1212
+++ b/net/minecraft/server/level/ServerPlayer.java
13-
@@ -739,8 +739,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
13+
@@ -729,8 +729,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
1414
Optional<ValueInput> rootTag = playerInput.child("RootVehicle");
1515
if (!rootTag.isEmpty()) {
1616
ServerLevel serverLevel = this.level();

0 commit comments

Comments
 (0)