Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit 70131e8

Browse files
author
Arthur Blanchot
committed
Add Petal patches + refactor configuration
1 parent 83dc602 commit 70131e8

File tree

93 files changed

+1906
-1723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1906
-1723
lines changed

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ group=wtf.etil.mirai
22
version=1.19-R0.1-SNAPSHOT
33
mcVersion=1.19
44
packageVersion=1_19_R1
5-
pufferfishRef=ddbd29beb796b7878b8344543cf784794fd164eb
5+
pufferfishRef=f6aa872dbfbb7c36c81d2043f4997c41fc0d065d
66

77
org.gradle.caching=true
88
org.gradle.caching.debug=false
99
org.gradle.configureondemand=true
1010
org.gradle.parallel=true
1111
org.gradle.vfs.watch=false
1212
org.gradle.daemon=false
13-
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Djdk.nio.maxCachedBufferSize=262144
13+
org.gradle.jvmargs=-Dfile.encoding=UTF-8

gradle/wrapper/gradle-wrapper.jar

935 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+6
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ set -- \
205205
org.gradle.wrapper.GradleWrapperMain \
206206
"$@"
207207

208+
# Stop when "xargs" is not available.
209+
if ! command -v xargs >/dev/null 2>&1
210+
then
211+
die "xargs is not available"
212+
fi
213+
208214
# Use "xargs" to parse quoted args.
209215
#
210216
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

+8-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,7 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
43+
if %ERRORLEVEL% equ 0 goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7575

7676
:end
7777
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
78+
if %ERRORLEVEL% equ 0 goto mainEnd
7979

8080
:fail
8181
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8282
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
83+
set EXIT_CODE=%ERRORLEVEL%
84+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
85+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
86+
exit /b %EXIT_CODE%
8587

8688
:mainEnd
8789
if "%OS%"=="Windows_NT" endlocal

patches/api/0001-Mirai-Configuration.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: [PATCH] Mirai Configuration
55

66

77
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
8-
index e756edf56995f4552387c2e1082307eb3dd48bb3..58bb08e35e26400f967af89bfe963b23bc4ff79d 100644
8+
index 56e261efa654e4a6872ccea28f0461df13845d13..b3421340e3cd0c091f6db2e1cb1b2f3201079a7e 100644
99
--- a/src/main/java/org/bukkit/Server.java
1010
+++ b/src/main/java/org/bukkit/Server.java
11-
@@ -1922,6 +1922,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
11+
@@ -1937,6 +1937,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
1212
}
1313
// Paper end
1414

patches/api/0003-Add-last-tick-time-API.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Original code by YatopiaMC, licensed under MIT
77
You can find the original code on https://github.com/YatopiaMC/Yatopia
88

99
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
10-
index 3506a7fa07ee6e53704b1df8d8d2bb08704bfc37..920b55c2b9f0209490271ce416c05f7a7d8e9b13 100644
10+
index 92a1462261029e804da73da2743bbd68e57841e9..89babe7bec9eee5034aada0907de8d1d805bcdfe 100644
1111
--- a/src/main/java/org/bukkit/Bukkit.java
1212
+++ b/src/main/java/org/bukkit/Bukkit.java
13-
@@ -2380,6 +2380,16 @@ public final class Bukkit {
13+
@@ -2397,6 +2397,16 @@ public final class Bukkit {
1414
return server.isStopping();
1515
}
1616

@@ -28,10 +28,10 @@ index 3506a7fa07ee6e53704b1df8d8d2bb08704bfc37..920b55c2b9f0209490271ce416c05f7a
2828
* Returns the {@link com.destroystokyo.paper.entity.ai.MobGoals} manager
2929
*
3030
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
31-
index 58bb08e35e26400f967af89bfe963b23bc4ff79d..932fea11c30ddea6e7a3bf9d4ff516a8f792849c 100644
31+
index b3421340e3cd0c091f6db2e1cb1b2f3201079a7e..7a202fb00f0f81de8c657d60a4d0fd9d3d653e58 100644
3232
--- a/src/main/java/org/bukkit/Server.java
3333
+++ b/src/main/java/org/bukkit/Server.java
34-
@@ -2081,6 +2081,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
34+
@@ -2096,6 +2096,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
3535
*/
3636
boolean isStopping();
3737

patches/api/0004-Optimize-Spigot-event-bus.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ index 419aec56b0e3fa8bcec2ea7f340caa3456b57d00..8530d926931a54ed1300c40cd1e0908b
2424
}
2525
}
2626
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
27-
index aed2209b66f11a0d03473cf19437f3da0e9e573a..1e482ee08b2c0b155ac0a64f0913155f9612b83f 100644
27+
index 6aba652af2b2f054ad22c77e4e59f0ed3eddc685..8c9b19888430421a8cdef91d707fb43efc7b15ea 100644
2828
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
2929
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
30-
@@ -648,11 +648,15 @@ public final class SimplePluginManager implements PluginManager {
30+
@@ -653,11 +653,15 @@ public final class SimplePluginManager implements PluginManager {
3131
@Override
3232
public void callEvent(@NotNull Event event) {
3333
// Paper - replace callEvent by merging to below method

patches/api/0005-Skip-event-if-no-listeners.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Original code by Titaniumtown, licensed under GNU General Public License v3.0
77
You can find the original code on https://gitlab.com/Titaniumtown/JettPack
88

99
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
10-
index 1e482ee08b2c0b155ac0a64f0913155f9612b83f..c525e93712ceea029ed50237932d998610249205 100644
10+
index 8c9b19888430421a8cdef91d707fb43efc7b15ea..a18724748aca4032981f1123055a9abefa77d9e1 100644
1111
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
1212
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
13-
@@ -647,6 +647,13 @@ public final class SimplePluginManager implements PluginManager {
13+
@@ -652,6 +652,13 @@ public final class SimplePluginManager implements PluginManager {
1414
*/
1515
@Override
1616
public void callEvent(@NotNull Event event) {
@@ -24,7 +24,7 @@ index 1e482ee08b2c0b155ac0a64f0913155f9612b83f..c525e93712ceea029ed50237932d9986
2424
// Paper - replace callEvent by merging to below method
2525
// KTP start - optimize spigot event bus
2626
final boolean isAsync = event.isAsynchronous();
27-
@@ -658,8 +665,8 @@ public final class SimplePluginManager implements PluginManager {
27+
@@ -663,8 +670,8 @@ public final class SimplePluginManager implements PluginManager {
2828
}
2929
// KTP end - optimize spigot event bus
3030

patches/api/0007-Suspected-plugins-report.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Subject: [PATCH] Suspected plugins report
66
Added "Suspected Plugins" to Watchdog, crash reports and exception messages
77

88
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
9-
index c525e93712ceea029ed50237932d998610249205..434d7c02001d16e542fd892ded23085fcf9e78a2 100644
9+
index a18724748aca4032981f1123055a9abefa77d9e1..cd09dcb1a41cbea5ef9f726281a82b7d362efacb 100644
1010
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
1111
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
12-
@@ -618,7 +618,11 @@ public final class SimplePluginManager implements PluginManager {
12+
@@ -623,7 +623,11 @@ public final class SimplePluginManager implements PluginManager {
1313
// Paper start
1414
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
1515
gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
@@ -22,7 +22,7 @@ index c525e93712ceea029ed50237932d998610249205..434d7c02001d16e542fd892ded23085f
2222
gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
2323
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerPluginEnableDisableException(msg, ex, plugin)));
2424
}
25-
@@ -692,7 +696,11 @@ public final class SimplePluginManager implements PluginManager {
25+
@@ -697,7 +701,11 @@ public final class SimplePluginManager implements PluginManager {
2626
gg.pufferfish.pufferfish.sentry.SentryContext.setEventContext(event, registration); // Pufferfish
2727
// Paper start - error reporting
2828
String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName();
@@ -35,7 +35,7 @@ index c525e93712ceea029ed50237932d998610249205..434d7c02001d16e542fd892ded23085f
3535
gg.pufferfish.pufferfish.sentry.SentryContext.removeEventContext(); // Pufferfish
3636
if (!(event instanceof com.destroystokyo.paper.event.server.ServerExceptionEvent)) { // We don't want to cause an endless event loop
3737
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
38-
@@ -978,4 +986,10 @@ public final class SimplePluginManager implements PluginManager {
38+
@@ -983,4 +991,10 @@ public final class SimplePluginManager implements PluginManager {
3939
}
4040
// Paper end
4141

patches/server/0001-Mirai-Branding-Changes.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Subject: [PATCH] Mirai Branding Changes
55

66

77
diff --git a/build.gradle.kts b/build.gradle.kts
8-
index a4a146d9c3e07bdf941d81147ca31daf4689a687..fb0da758cce2c7022aa23dfb3dc62f29513ba6a9 100644
8+
index 74c91f79576e85618fefb79be8d313ba871701c7..17867a1cbf2e4aec601b2bc836a2b3a808feb5b7 100644
99
--- a/build.gradle.kts
1010
+++ b/build.gradle.kts
1111
@@ -9,7 +9,7 @@ plugins {
@@ -69,7 +69,7 @@ index b0390eedb507d27426d1e1d73bd4ab63aec89ebe..509a9a5326d94200ca3d7a83ae47c6bb
6969
.completer(new ConsoleCommandCompleter(this.server))
7070
.option(LineReader.Option.COMPLETE_IN_WORD, true);
7171
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
72-
index e96ff8b13b1237d7c70359b78e4d72938877191f..fc3d65885cc704f807ddcb07561b4a529827166c 100644
72+
index 7fd7c3be306d93201a61bb616f8c09cb066d4204..e995aa81665bdf582f753acec3f0584f0060c851 100644
7373
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
7474
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
7575
@@ -1656,7 +1656,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -82,10 +82,10 @@ index e96ff8b13b1237d7c70359b78e4d72938877191f..fc3d65885cc704f807ddcb07561b4a52
8282

8383
public SystemReport fillSystemReport(SystemReport details) {
8484
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
85-
index 33218552405c526955d30031469d3044c724dde3..008e8cdb9bc17bbdcd4886fca8a50311262e457e 100644
85+
index b5de069683a615be9b9b33c3d8e61e46bbbec8e3..2aece16c65245337e59f7b08d6fcd76916055fc2 100644
8686
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
8787
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
88-
@@ -245,7 +245,7 @@ import javax.annotation.Nullable; // Paper
88+
@@ -246,7 +246,7 @@ import javax.annotation.Nullable; // Paper
8989
import javax.annotation.Nonnull; // Paper
9090

9191
public final class CraftServer implements Server {

0 commit comments

Comments
 (0)