Skip to content

Commit cf3752d

Browse files
authored
Merge branch 'PaperMC:master' into master
2 parents a8cd0d3 + e97b1ee commit cf3752d

File tree

40 files changed

+6020
-5162
lines changed

40 files changed

+6020
-5162
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ run/
4848

4949
Folia-Server
5050
Folia-API
51+
paper-api-generator
5152

5253
!gradle/wrapper/gradle-wrapper.jar

build-data/dev-imports.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
99
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
1010
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
11+
minecraft net.minecraft.world.TickRateManager
12+
minecraft net.minecraft.server.ServerTickRateManager
13+
minecraft net.minecraft.server.commands.TickCommand

build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
java
55
`maven-publish`
66
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
7-
id("io.papermc.paperweight.patcher") version "1.5.5"
7+
id("io.papermc.paperweight.patcher") version "1.5.11"
88
}
99

1010
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
@@ -17,7 +17,7 @@ repositories {
1717
}
1818

1919
dependencies {
20-
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
20+
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
2121
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
2222
paperclip("io.papermc:paperclip:3.0.3")
2323
}
@@ -65,6 +65,12 @@ paperweight {
6565
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
6666
serverOutputDir.set(layout.projectDirectory.dir("Folia-Server"))
6767
}
68+
patchTasks.register("generatedApi") {
69+
isBareDirectory = true
70+
upstreamDirPath = "paper-api-generator/generated"
71+
patchDir = layout.projectDirectory.dir("patches/generatedApi")
72+
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
73+
}
6874
}
6975
}
7076

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
group=dev.folia
22

3-
version=1.20.1-R0.1-SNAPSHOT
4-
mcVersion=1.20.1
5-
paperRef=4179b8f3fa86437aa1d9742930fd8ca6d23515a0
3+
version=1.20.4-R0.1-SNAPSHOT
4+
mcVersion=1.20.4
5+
paperRef=4939f8711884901ddf1c56337f606de71cdae78d
66

77
org.gradle.caching=true
88
org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

-17.7 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,26 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
197198
done
198199
fi
199200

200-
# Collect all arguments for the java command;
201-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202-
# shell script including quotes and variable substitutions, so put them in
203-
# double quotes to make sure that they get re-expanded; and
204-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
205210

206211
set -- \
207212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

patches/api/0002-Region-scheduler-API.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ index fc2dae69165776d08274e34a69962cc70445f411..06149045a44148bf0af5f52952ff0092
2323
}
2424

2525
diff --git a/src/main/java/org/bukkit/scheduler/BukkitScheduler.java b/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
26-
index d2ab2ee1e1e8fbaac4edef5b3ee313ee4ceb6991..8476504e3d54721c64f02eddd5b48193ac8f366b 100644
26+
index 487b5ca23159b531475c3d650894be707b49914e..31b90d1c2259a8f200b0589909dbbfe4cc526989 100644
2727
--- a/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
2828
+++ b/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
2929
@@ -7,6 +7,15 @@ import java.util.function.Consumer;

patches/api/0003-Require-plugins-to-be-explicitly-marked-as-Folia-sup.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ more helpful than some random error log caused by
1414
a breakage.
1515

1616
diff --git a/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java b/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java
17-
index ef393f1f93ca48264fc1b6e3a27787f6a9152e1b..1325f9fed80731b74b80145dadc843b1a34b851b 100644
17+
index bcf91d048d84144f6acf9bfd2095df9ada2e585f..3072f95dc1cafb47c1820dc67c8d24991540fc4a 100644
1818
--- a/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java
1919
+++ b/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java
2020
@@ -200,4 +200,12 @@ public interface PluginMeta {
@@ -31,10 +31,10 @@ index ef393f1f93ca48264fc1b6e3a27787f6a9152e1b..1325f9fed80731b74b80145dadc843b1
3131
+
3232
}
3333
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
34-
index 07e8908d25fcd4e5eabadc9f019b54acff3b5e3c..02ab82f6d0eb2a5afbb6b0ac4d738097c4986ad1 100644
34+
index c0691a849831f99268fdcb7b0f471f80a1a2a70e..6f1d3935c2c398571c32e1be9786f74ec911c7bd 100644
3535
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
3636
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
37-
@@ -258,6 +258,21 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
37+
@@ -259,6 +259,21 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
3838
private Set<PluginAwareness> awareness = ImmutableSet.of();
3939
private String apiVersion = null;
4040
private List<String> libraries = ImmutableList.of();
@@ -56,7 +56,7 @@ index 07e8908d25fcd4e5eabadc9f019b54acff3b5e3c..02ab82f6d0eb2a5afbb6b0ac4d738097
5656
// Paper start - oh my goddddd
5757
/**
5858
* Don't use this.
59-
@@ -1241,6 +1256,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
59+
@@ -1242,6 +1257,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
6060
if (map.get("prefix") != null) {
6161
prefix = map.get("prefix").toString();
6262
}
@@ -68,7 +68,7 @@ index 07e8908d25fcd4e5eabadc9f019b54acff3b5e3c..02ab82f6d0eb2a5afbb6b0ac4d738097
6868
}
6969

7070
@NotNull
71-
@@ -1317,6 +1337,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
71+
@@ -1318,6 +1338,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
7272
if (prefix != null) {
7373
map.put("prefix", prefix);
7474
}

patches/api/0005-Add-API-for-checking-ownership-of-region-by-position.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ the schedulers depending on the result of the ownership
1111
check.
1212

1313
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
14-
index f380a518bc444bfdfbbedf38805c7684e53a5629..c54d5f254a4e7055470a4868187de3a18c21d0e5 100644
14+
index ca27559cf4aa1c2e44fdca2022e213b1b1c80f4e..3fae7b21353d18ff1e8005fbbe83be783de8a953 100644
1515
--- a/src/main/java/org/bukkit/Bukkit.java
1616
+++ b/src/main/java/org/bukkit/Bukkit.java
17-
@@ -2709,6 +2709,14 @@ public final class Bukkit {
17+
@@ -2857,6 +2857,14 @@ public final class Bukkit {
1818
return server.isOwnedByCurrentRegion(entity);
1919
}
2020
// Paper end - Folia region threading API
@@ -30,10 +30,10 @@ index f380a518bc444bfdfbbedf38805c7684e53a5629..c54d5f254a4e7055470a4868187de3a1
3030
@NotNull
3131
public static Server.Spigot spigot() {
3232
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
33-
index 68206cf0178c26c0f528a1e14a5fb4e9ad410369..f77553fc70bc1f3f18af50e53c0041bbaaebab9a 100644
33+
index b4f8281d3797ec825a7671f38077cd65d5a1d76e..fe3d89c2c319c4f4b2b3e4a121d6626a898f501b 100644
3434
--- a/src/main/java/org/bukkit/Server.java
3535
+++ b/src/main/java/org/bukkit/Server.java
36-
@@ -2364,4 +2364,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
36+
@@ -2497,4 +2497,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
3737
*/
3838
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
3939
// Paper end - Folia region threading API

0 commit comments

Comments
 (0)