Skip to content

Commit

Permalink
1.21.3 (#382)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Lumine1909 <[email protected]>
  • Loading branch information
s-yh-china and Lumine1909 authored Dec 2, 2024
1 parent 0fcb32c commit de4f3fe
Show file tree
Hide file tree
Showing 167 changed files with 3,015 additions and 4,957 deletions.
12 changes: 11 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
charset = utf-8
end_of_line = lf
Expand Down Expand Up @@ -54,6 +56,7 @@ ij_java_blank_lines_after_package = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_around_field = 0
ij_java_blank_lines_around_field_in_interface = 0
ij_java_blank_lines_around_field_with_annotations = 0
ij_java_blank_lines_around_initializer = 1
ij_java_blank_lines_around_method = 1
ij_java_blank_lines_around_method_in_interface = 1
Expand Down Expand Up @@ -131,6 +134,7 @@ ij_java_for_statement_right_paren_on_new_line = false
ij_java_for_statement_wrap = off
ij_java_generate_final_locals = false
ij_java_generate_final_parameters = false
ij_java_generate_use_type_annotation_before_type = true
ij_java_if_brace_force = never
ij_java_imports_layout = *, |, javax.**, java.**, |, $*
ij_java_indent_case_from_switch = true
Expand Down Expand Up @@ -276,6 +280,7 @@ ij_java_spaces_around_relational_operators = true
ij_java_spaces_around_shift_operators = true
ij_java_spaces_around_type_bounds_in_type_parameters = true
ij_java_spaces_around_unary_operator = false
ij_java_spaces_inside_block_braces_when_body_is_present = false
ij_java_spaces_within_angle_brackets = false
ij_java_spaces_within_annotation_parentheses = false
ij_java_spaces_within_array_initializer_braces = false
Expand Down Expand Up @@ -307,7 +312,7 @@ ij_java_test_name_suffix = Test
ij_java_throws_keyword_wrap = off
ij_java_throws_list_wrap = off
ij_java_use_external_annotations = false
ij_java_use_fq_class_names = false
ij_java_use_fq_class_names = true
ij_java_use_relative_indents = false
ij_java_use_single_class_imports = true
ij_java_variable_annotation_wrap = off
Expand Down Expand Up @@ -393,6 +398,7 @@ ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = true
ij_kotlin_import_nested_classes = false
ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^
ij_kotlin_indent_before_arrow_on_new_line = true
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 2
ij_kotlin_keep_blank_lines_in_code = 2
Expand Down Expand Up @@ -428,6 +434,7 @@ ij_kotlin_space_before_when_parentheses = true
ij_kotlin_space_before_while_parentheses = true
ij_kotlin_spaces_around_additive_operators = true
ij_kotlin_spaces_around_assignment_operators = true
ij_kotlin_spaces_around_elvis = true
ij_kotlin_spaces_around_equality_operators = true
ij_kotlin_spaces_around_function_type_arrow = true
ij_kotlin_spaces_around_logical_operators = true
Expand Down Expand Up @@ -521,6 +528,9 @@ ij_yaml_block_mapping_on_new_line = false
ij_yaml_indent_sequence_value = true
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_line_comment_add_space = false
ij_yaml_line_comment_add_space_on_reformat = false
ij_yaml_line_comment_at_first_column = true
ij_yaml_sequence_on_new_line = false
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ maven {
}

dependencies {
compileOnly("org.leavesmc.leaves:leaves-api:1.21.1-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves-api:1.21.3-R0.1-SNAPSHOT")
}
```

Expand All @@ -40,7 +40,7 @@ Each time you want to update your dependency, you must re-build Leaves.
Leaves-Server:
```kotlin
dependencies {
compileOnly("org.leavesmc.leaves:leaves:1.21.1-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves:1.21.3-R0.1-SNAPSHOT")
}
```

Expand Down
4 changes: 2 additions & 2 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ maven {
}

dependencies {
compileOnly("org.leavesmc.leaves:leaves-api:1.21.1-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves-api:1.21.3-R0.1-SNAPSHOT")
}
```

Expand All @@ -39,7 +39,7 @@ dependencies {
Leaves-Server:
```kotlin
dependencies {
compileOnly("org.leavesmc.leaves:leaves:1.21.1-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves:1.21.3-R0.1-SNAPSHOT")
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
java
`maven-publish`
id("org.leavesmc.leavesweight.patcher") version "1.0.0-SNAPSHOT"
id("org.leavesmc.leavesweight.patcher") version "1.0.1-SNAPSHOT"
}

allprojects {
Expand Down
9 changes: 4 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
group=org.leavesmc.leaves
version=1.21.1-R0.1-SNAPSHOT
mcVersion=1.21.1
paperRef=84281ceeefb9d294758a9a292ba6c01da40e8409
preVersion=false
updatingMinecraft=false
version=1.21.3-R0.1-SNAPSHOT
mcVersion=1.21.3
paperRef=27e4ddcd067d4825eb01cb05d6975c46252eeafa
preVersion=true
org.gradle.jvmargs=-Xmx2G
org.gradle.caching=true
org.gradle.parallel=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 6 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -246,4 +249,4 @@ eval "set -- $(
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
exec "$JAVACMD" "$@"
4 changes: 3 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -89,4 +91,4 @@ exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
:omega
4 changes: 2 additions & 2 deletions patches/api/0001-Leaves-Server-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Server Config


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 6246251caf2c6f025c824b8e7a944b8d48751fa1..80949894308e597676745e312474fe0c9672a23e 100644
index 0b78564256ebc647ebac402e549d86ab6e307c8d..cbe69a0267981173fe8f7d715764d982bd9dcc8d 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2264,6 +2264,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2282,6 +2282,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
throw new UnsupportedOperationException("Not supported yet.");
}
// Paper end
Expand Down
12 changes: 6 additions & 6 deletions patches/api/0003-Add-fakeplayer-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add fakeplayer api


diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index e20e4239a5a1f952e1c70e899549989d5e42f73c..5f6078bc80e20c9482a96d2bf1095bb32fbfc28c 100644
index 5ce98e09e9bfcae45896401c69578aa879222893..cb7e06ad207239a5626fc475c46d991fabb48293 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2917,6 +2917,17 @@ public final class Bukkit {
@@ -2964,6 +2964,17 @@ public final class Bukkit {
}
// Paper end - Folia region threading API

Expand All @@ -27,7 +27,7 @@ index e20e4239a5a1f952e1c70e899549989d5e42f73c..5f6078bc80e20c9482a96d2bf1095bb3
public static Server.Spigot spigot() {
return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 80949894308e597676745e312474fe0c9672a23e..133ae299ba12e0da9c5fa252a06bbf4f2b7b9016 100644
index 0bae85d3489b628d2a2542f3c7b6f91f4a7c4af5..967bb7ba476f494ac8bfebb599f260017176f3e3 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -62,6 +62,7 @@ import org.jetbrains.annotations.ApiStatus;
Expand All @@ -38,10 +38,10 @@ index 80949894308e597676745e312474fe0c9672a23e..133ae299ba12e0da9c5fa252a06bbf4f

/**
* Represents a server implementation.
@@ -2562,4 +2563,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2615,4 +2616,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
// Paper end - API to check if the server is sleeping
+
+ // Leaves start - Bot API
+ /**
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0005-Hide-irrelevant-compilation-warnings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Hide irrelevant compilation warnings


diff --git a/build.gradle.kts b/build.gradle.kts
index ab84a1405acc1f0d5f267892243b82b8dab03e21..beee863333fa8ebb31cd83d6a1451b51c770bf2d 100644
index e29e5024fa693baae469d47fe77b57118f14627c..7a60cd45449950cfb116b1cb29bc3da4ba074e7d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -131,6 +131,15 @@ val generateApiVersioningFile by tasks.registering {
@@ -148,6 +148,15 @@ val generateApiVersioningFile by tasks.registering {
}
}

Expand All @@ -24,7 +24,7 @@ index ab84a1405acc1f0d5f267892243b82b8dab03e21..beee863333fa8ebb31cd83d6a1451b51
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -190,6 +199,8 @@ tasks.withType<Javadoc> {
@@ -207,6 +216,8 @@ tasks.withType<Javadoc> {
into("build/docs/javadoc")
}
}
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0006-SIMD-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] SIMD support


diff --git a/build.gradle.kts b/build.gradle.kts
index beee863333fa8ebb31cd83d6a1451b51c770bf2d..1491188671ce741afbbc4006c03510a328e92dbd 100644
index 7a60cd45449950cfb116b1cb29bc3da4ba074e7d..caaffd1d0a323a2b292fb9c8ceeac271ba9dd635 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -137,6 +137,7 @@ tasks.withType<JavaCompile> {
@@ -154,6 +154,7 @@ tasks.withType<JavaCompile> {
compilerArgs.add("-Xlint:-module")
compilerArgs.add("-Xlint:-removal")
compilerArgs.add("-Xlint:-dep-ann")
+ compilerArgs.add("--add-modules=jdk.incubator.vector") // Leaves - SIMD support
}
// Leaves end - hide irrelevant compilation warnings

@@ -201,6 +202,7 @@ tasks.withType<Javadoc> {
@@ -218,6 +219,7 @@ tasks.withType<Javadoc> {
}

options.addStringOption("Xdoclint:none", "-quiet") // Leaves - hide irrelevant compilation warnings
Expand Down
33 changes: 14 additions & 19 deletions patches/api/0007-Delete-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Delete Timings

diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
deleted file mode 100644
index 3e747abde6fefae90f1c15cb00158bc5303cbe50..0000000000000000000000000000000000000000
index 73b125979e2f2dfd13cbf689a90b29cc68a36e09..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/FullServerTickHandler.java
+++ /dev/null
@@ -1,89 +0,0 @@
Expand Down Expand Up @@ -92,7 +92,7 @@ index 3e747abde6fefae90f1c15cb00158bc5303cbe50..00000000000000000000000000000000
- TimingsManager.HISTORY.add(new TimingHistory());
- TimingsManager.resetTimings();
- }
- Bukkit.getUnsafe().reportTimings();
- //Bukkit.getUnsafe().reportTimings();
- }
-
- boolean isViolated() {
Expand Down Expand Up @@ -1279,10 +1279,10 @@ index df142a89b8c43acb81eb383eac0ef048a1f49a6e..00000000000000000000000000000000
-}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
deleted file mode 100644
index e81d0bc309de877ed2b5da6122f55c162e9b5f10..0000000000000000000000000000000000000000
index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/Timings.java
+++ /dev/null
@@ -1,331 +0,0 @@
@@ -1,325 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
Expand Down Expand Up @@ -1430,22 +1430,16 @@ index e81d0bc309de877ed2b5da6122f55c162e9b5f10..00000000000000000000000000000000
- * @param enabled Should timings be reported
- */
- public static void setTimingsEnabled(boolean enabled) {
- timingsEnabled = enabled;
- warnAboutDeprecationOnEnable();
- reset();
- }
-
- private static void warnAboutDeprecationOnEnable() {
- if (timingsEnabled && !warnedAboutDeprecationOnEnable) {
- Bukkit.getLogger().warning(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
- if (enabled && !warnedAboutDeprecationOnEnable) {
- Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
- warnedAboutDeprecationOnEnable = true;
- }
- }
-
- public static Component deprecationMessage() {
- return Component.text()
- .color(TextColor.color(0xffc93a))
- .append(Component.text("[!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future."))
- .append(Component.text("[!] The timings profiler is in no-op mode and will be fully removed in a later update."))
- .append(Component.newline())
- .append(Component.text(" We recommend migrating to the spark profiler."))
- .append(Component.newline())
Expand Down Expand Up @@ -1616,10 +1610,10 @@ index e81d0bc309de877ed2b5da6122f55c162e9b5f10..00000000000000000000000000000000
-
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
deleted file mode 100644
index 95d87c9dbf2b237787294dfbe7fed87a36e6dedf..0000000000000000000000000000000000000000
index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
+++ /dev/null
@@ -1,126 +0,0 @@
@@ -1,127 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
Expand Down Expand Up @@ -1678,8 +1672,9 @@ index 95d87c9dbf2b237787294dfbe7fed87a36e6dedf..00000000000000000000000000000000
- if (!testPermission(sender)) {
- return true;
- }
- if (false) {
- if (true) {
- sender.sendMessage(Timings.deprecationMessage());
- return true;
- }
- if (args.length < 1) {
- sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
Expand Down Expand Up @@ -2182,7 +2177,7 @@ index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..940565704d0e8914a76cf25daf7d1f5e
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
//target.timings.stopTiming(); // Spigot // Paper
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 003bece642b682985625db93cad93026352bfc66..308245714a0a830d92568f7bb1f4bb9c45828345 100644
index b878e7167cfcdea0e224c182b40abeadd339d3b3..fc0239bca93e3dfb740af3239c1276b004607643 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -720,12 +720,7 @@ public final class SimplePluginManager implements PluginManager {
Expand All @@ -2209,9 +2204,9 @@ index 003bece642b682985625db93cad93026352bfc66..308245714a0a830d92568f7bb1f4bb9c
}

/**
@@ -965,7 +959,6 @@ public final class SimplePluginManager implements PluginManager {
* @param use True if per event timing code should be used
@@ -966,7 +960,6 @@ public final class SimplePluginManager implements PluginManager {
*/
@Deprecated(forRemoval = true)
public void useTimings(boolean use) {
- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
}
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0008-Force-peaceful-mode-switch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch


diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ef32a937e6faf1e8a5d6b1207986715bae5a246c..29343b0f5c5b91e66e13c2d8d5e1952762af8526 100644
index 7a439c99fc4c5ee17d674460c8e58a9fe0c64e02..3d5893c4cb6fc914ff2dbbb2267420ec8653dac3 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4277,6 +4277,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4314,6 +4314,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
void setSendViewDistance(int viewDistance);
// Paper end - view distance api

Expand Down
Loading

0 comments on commit de4f3fe

Please sign in to comment.