Archiviert
13
0

Updated Upstream (Bukkit/CraftBukkit) (#10379)

Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f02baa38 PR-988: Add World#getIntersectingChunks(BoundingBox)
9321d665 Move getItemInUse up to LivingEntity
819eef73 PR-959: Add access to current item's remaining ticks
c4fdadb0 SPIGOT-7601: Add AbstractArrow#getItem
be8261ca Add support for Java 22
26119676 PR-979: Add more translation keys
66753362 PR-985: Correct book maximum pages and characters per page documentation
c8be92fa PR-980: Improve getArmorContents() documentation
f1120ee2 PR-983: Expose riptide velocity to PlayerRiptideEvent

CraftBukkit Changes:
dfaa89bbe PR-1369: Add World#getIntersectingChunks(BoundingBox)
51bbab2b9 Move getItemInUse up to LivingEntity
668e09602 PR-1331: Add access to current item's remaining ticks
a639406d1 SPIGOT-7601: Add AbstractArrow#getItem
0398930fc SPIGOT-7602: Allow opening in-world horse and related inventories
ffd15611c SPIGOT-7608: Allow empty lists to morph to any PDT list
2188dcfa9 Add support for Java 22
45d6a609f SPIGOT-7604: Revert "SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime"
06d915943 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
ca3bc3707 PR-1361: Add more translation keys
366c3ca80 SPIGOT-7600: EntityChangeBlockEvent is not fired for frog eggs
06d0f9ba8 SPIGOT-7593: Fix sapling growth physics / client-side updates
45c2608e4 PR-1366: Expose riptide velocity to PlayerRiptideEvent
29b6bb79b SPIGOT-7587: Remove fixes for now-resolved MC-142590 and MC-109346
Dieser Commit ist enthalten in:
Jake Potrebic 2024-04-06 12:53:39 -07:00 committet von GitHub
Ursprung a2035440cf
Commit bd38e0318a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
397 geänderte Dateien mit 1094 neuen und 919 gelöschten Zeilen

Datei anzeigen

@ -17,7 +17,7 @@ dependencies {
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:1.3") testImplementation("org.hamcrest:hamcrest-library:1.3")
testImplementation("org.ow2.asm:asm-tree:9.2") testImplementation("org.ow2.asm:asm-tree:9.7")
} }
configure<PublishingExtension> { configure<PublishingExtension> {

Datei anzeigen

@ -27,7 +27,7 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d
+/.factorypath +/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d4b72e23a index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b5a6892a5
--- /dev/null --- /dev/null
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -0,0 +1,91 @@ @@ -0,0 +1,91 @@
@ -63,8 +63,8 @@ index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d
+ testImplementation("org.apache.commons:commons-lang3:3.12.0") + testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+ testImplementation("org.hamcrest:hamcrest:2.2") + testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.5.0") + testImplementation("org.mockito:mockito-core:5.11.0")
+ testImplementation("org.ow2.asm:asm-tree:9.5") + testImplementation("org.ow2.asm:asm-tree:9.7")
+} +}
+ +
+configure<PublishingExtension> { +configure<PublishingExtension> {
@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d
+} +}
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
deleted file mode 100644 deleted file mode 100644
index 0861b44936958613beba670b0d82e21d3aaf388b..0000000000000000000000000000000000000000 index 931d1a0215f54a4ff172b1b6db2ab06c41cd0c39..0000000000000000000000000000000000000000
--- a/pom.xml --- a/pom.xml
+++ /dev/null +++ /dev/null
@@ -1,277 +0,0 @@ @@ -1,277 +0,0 @@
@ -237,13 +237,13 @@ index 0861b44936958613beba670b0d82e21d3aaf388b..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.mockito</groupId> - <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId> - <artifactId>mockito-core</artifactId>
- <version>5.5.0</version> - <version>5.11.0</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.ow2.asm</groupId> - <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId> - <artifactId>asm-tree</artifactId>
- <version>9.5</version> - <version>9.7</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- </dependencies> - </dependencies>

Datei anzeigen

@ -7,7 +7,7 @@ Currently includes generated key holder classes for types
used in the Registry Modification API used in the Registry Modification API
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 948bd84db9923ef43cf753b7b72bf4d0081ab43a..4ee1aed72727e911bff4ac91bcacfd8eee87ecfc 100644 index be4d301b305f5cd92d2ff352bfb9c6ff9f82fd9b..01e3a5ba74f8d4c4c2eb010b289e2a7785b11bcc 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -19,7 +19,7 @@ index 948bd84db9923ef43cf753b7b72bf4d0081ab43a..4ee1aed72727e911bff4ac91bcacfd8e
java { java {
@@ -45,6 +46,22 @@ dependencies { @@ -45,6 +46,22 @@ dependencies {
testImplementation("org.ow2.asm:asm-tree:9.5") testImplementation("org.ow2.asm:asm-tree:9.7")
} }
+// Paper start +// Paper start

Datei anzeigen

@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de> Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index b3df8cf8d32a4cc99a3a3950f146cdab65826e1b..9011451c6a60db08dcc255a84470f8ce92f7b2a4 100644 index f605e7e0f812a2297b1cecf3f37b69a8edc6b4a5..e3748b4b39529fde27e5bb00597a56becdf0843c 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -11,12 +11,28 @@ java { @@ -11,12 +11,28 @@ java {
@ -1493,7 +1493,7 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 6ca5f7a85087ca1c7e5e2d940bd3c65b84d2d356..0f902aec66ec550f80709f7f314ca90d374ebb53 100644 index ef3c0410ba4f88ec8b51e79abdc97777fdc00d31..913cf8308840ca1f365eb1f456f64b96046ed060 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable; @@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable;
@ -1525,7 +1525,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
return warning == null || warning.value(); return warning == null || warning.value();
} }
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddecefbd863e 100644 index 28193b8e3c79e14af2ce47857a717f9dd4f1fa42..b53f24c0368ff4e4f5287f1699643a0c00579031 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable; @@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
@ -1537,7 +1537,7 @@ index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddec
/** /**
* Gets the {@link Block} at the given coordinates * Gets the {@link Block} at the given coordinates
@@ -608,6 +608,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -617,6 +617,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull @NotNull
public List<Player> getPlayers(); public List<Player> getPlayers();
@ -2180,10 +2180,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
public void sendRawMessage(@Nullable UUID sender, @NotNull String message); public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
} }
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index c349cd16de02981392a8788ddaa3152e901aacff..6a915b5b41daa5ea64913a2d5c611a6167168395 100644 index a456e43308b95f51beed2159e6baf00f32702a71..350d52f4dd97a7e6a6a9a967e1c6a8781feda22e 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java --- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -295,6 +295,19 @@ public abstract class Enchantment implements Keyed { @@ -296,6 +296,19 @@ public abstract class Enchantment implements Keyed, Translatable {
* @return True if the enchantment may be applied, otherwise False * @return True if the enchantment may be applied, otherwise False
*/ */
public abstract boolean canEnchantItem(@NotNull ItemStack item); public abstract boolean canEnchantItem(@NotNull ItemStack item);
@ -4356,7 +4356,7 @@ index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401958fb227 100644 index fc94719f702f23da8de5340d7f9e9b9d0c9d7c66..86c9e4229a1936c5893016e5b8087aa9fd06ddab 100644
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java --- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable; @@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
@ -4510,7 +4510,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/** /**
@@ -157,7 +266,9 @@ public interface BookMeta extends ItemMeta { @@ -157,7 +266,9 @@ public interface BookMeta extends ItemMeta {
* pages. Maximum 100 pages with 256 characters per page. * pages. Maximum 100 pages with 1024 characters per page.
* *
* @param pages A list of pages to set the book to use * @param pages A list of pages to set the book to use
+ * @deprecated in favour of {@link #pages(List)} + * @deprecated in favour of {@link #pages(List)}
@ -4520,7 +4520,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/** /**
@@ -165,7 +276,9 @@ public interface BookMeta extends ItemMeta { @@ -165,7 +276,9 @@ public interface BookMeta extends ItemMeta {
* pages. Maximum 50 pages with 256 characters per page. * pages. Maximum 100 pages with 1024 characters per page.
* *
* @param pages A list of strings, each being a page * @param pages A list of strings, each being a page
+ * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)} + * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)}
@ -4530,7 +4530,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/** /**
@@ -173,7 +286,9 @@ public interface BookMeta extends ItemMeta { @@ -173,7 +286,9 @@ public interface BookMeta extends ItemMeta {
* 256 characters per page. * 1024 characters per page.
* *
* @param pages A list of strings, each being a page * @param pages A list of strings, each being a page
+ * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)} + * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)}
@ -4695,6 +4695,58 @@ index 9f159ac909ad5287b719cee331db5c44654ec547..f1fcc844d563a0108230676dec84ef25
void setLore(@Nullable List<String> lore); void setLore(@Nullable List<String> lore);
/** /**
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab572cf54548 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
@@ -51,4 +51,21 @@ public interface TrimMaterial extends Keyed, Translatable {
* {@link Material#AMETHYST_SHARD}.
*/
public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst"));
+
+ // Paper start - adventure
+ /**
+ * Get the description of this {@link TrimMaterial}.
+ *
+ * @return the description
+ */
+ net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component description();
+
+ /**
+ * @deprecated this method assumes that {@link #description()} will
+ * always be a translatable component which is not guaranteed.
+ */
+ @Override
+ @Deprecated(forRemoval = true)
+ @org.jetbrains.annotations.NotNull String getTranslationKey();
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
index ccf02c79e2784de75273f5ad7f83ce5c33a688fe..3fa087d09c7c2d864eea25659951a537359c9589 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
@@ -75,4 +75,21 @@ public interface TrimPattern extends Keyed, Translatable {
* {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}.
*/
public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host"));
+
+ // Paper start - adventure
+ /**
+ * Get the description of this {@link TrimPattern}.
+ *
+ * @return the description
+ */
+ net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component description();
+
+ /**
+ * @deprecated this method assumes that {@link #description()} will
+ * always be a translatable component which is not guaranteed.
+ */
+ @Override
+ @Deprecated(forRemoval = true)
+ @org.jetbrains.annotations.NotNull String getTranslationKey();
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index b90fd819a781d3a2117ffa25f0864b1576901f9f..7d4f4970dae6fe4eeea6b6b6810dcecfe20d6e51 100644 index b90fd819a781d3a2117ffa25f0864b1576901f9f..7d4f4970dae6fe4eeea6b6b6810dcecfe20d6e51 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java --- a/src/main/java/org/bukkit/map/MapCursor.java

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods. Uses method handles for private or static methods.
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index b577114c2b89fe2053123d1a542d37dff7fa8d5a..af6c528ccc4356f5bba3ce0b9bf6de237d77376e 100644 index e3748b4b39529fde27e5bb00597a56becdf0843c..2aca0a8feffc844ee19480d70a1a9971790d1621 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -47,6 +47,9 @@ dependencies { @@ -47,6 +47,9 @@ dependencies {
@ -14,8 +14,8 @@ index b577114c2b89fe2053123d1a542d37dff7fa8d5a..af6c528ccc4356f5bba3ce0b9bf6de23
apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-serializer-plain")
apiAndDocs("net.kyori:adventure-text-logger-slf4j") apiAndDocs("net.kyori:adventure-text-logger-slf4j")
+ +
+ implementation("org.ow2.asm:asm:9.5") + implementation("org.ow2.asm:asm:9.7")
+ implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7")
// Paper end // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Paper Plugins
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index af6c528ccc4356f5bba3ce0b9bf6de237d77376e..f9ff7e3692d448e2a1e38d0aa26c2d934442e247 100644 index 2aca0a8feffc844ee19480d70a1a9971790d1621..f9a9066e3e6a355acd5ddb3b0308b5b3b36b82f2 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -52,7 +52,7 @@ dependencies { @@ -52,7 +52,7 @@ dependencies {
implementation("org.ow2.asm:asm-commons:9.5") implementation("org.ow2.asm:asm-commons:9.7")
// Paper end // Paper end
- compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") - compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
@ -1347,10 +1347,10 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8
+ +
+} +}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 0f902aec66ec550f80709f7f314ca90d374ebb53..20efbec3eabb21806a532422130f7904d2c0967e 100644 index 913cf8308840ca1f365eb1f456f64b96046ed060..6e46302c272b468375f2de3f7f992f55f13805b8 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -127,4 +127,13 @@ public interface UnsafeValues { @@ -129,4 +129,13 @@ public interface UnsafeValues {
@ApiStatus.Internal @ApiStatus.Internal
@NotNull @NotNull
DamageSource.Builder createDamageSourceBuilder(@NotNull DamageType damageType); DamageSource.Builder createDamageSourceBuilder(@NotNull DamageType damageType);

Datei anzeigen

@ -2897,7 +2897,7 @@ index 6aed59819cc3d70f1b5975c3c7df40cc0b0afd8a..baa02b5223769755670c611ca4d6acc7
* Sends the component to the player * Sends the component to the player
* *
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 20efbec3eabb21806a532422130f7904d2c0967e..853ef6f7f0cd2e5679688c40ce715b30473c3ce3 100644 index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba70e1e665 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -40,6 +40,7 @@ public interface UnsafeValues { @@ -40,6 +40,7 @@ public interface UnsafeValues {
@ -2908,7 +2908,7 @@ index 20efbec3eabb21806a532422130f7904d2c0967e..853ef6f7f0cd2e5679688c40ce715b30
Material toLegacy(Material material); Material toLegacy(Material material);
Material fromLegacy(Material material); Material fromLegacy(Material material);
@@ -136,4 +137,12 @@ public interface UnsafeValues { @@ -138,4 +139,12 @@ public interface UnsafeValues {
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion()); return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
} }
// Paper end // Paper end

Datei anzeigen

@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 853ef6f7f0cd2e5679688c40ce715b30473c3ce3..688fccdbc5cf831008ef2f27db9d15b0921a7561 100644 index 01e796e487cc16710f51b457466a37ba70e1e665..d69e5fa40702c283c370a2f712b51dc2ea3a1fa0 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -144,5 +144,12 @@ public interface UnsafeValues { @@ -146,5 +146,12 @@ public interface UnsafeValues {
* @return name * @return name
*/ */
String getTimingsServerName(); String getTimingsServerName();

Datei anzeigen

@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances.
Also add send/no-tick view distance to World. Also add send/no-tick view distance to World.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index d76db156a7eeefaac3c96d2d547fddecefbd863e..41a181b890e029f99e52ae9aad28a86f28005f9e 100644 index b53f24c0368ff4e4f5287f1699643a0c00579031..7176e37b37c0d22605240f3c5fd34ff7846256c9 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2916,6 +2916,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2925,6 +2925,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull @NotNull
public Set<FeatureFlag> getFeatureFlags(); public Set<FeatureFlag> getFeatureFlags();

Datei anzeigen

@ -7,10 +7,10 @@ Upstream added methods for this so the original methods
are now deprecated are now deprecated
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..eb8dcf3dc9acb171fec5b25342a9a38d7f9bcb36 100644 index 67632eae9249f2c65a9dfe04c72a3002a9e8b25b..10eeb304bc0785e0ea182ac99d32ed2554b4755f 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -217,12 +217,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -243,12 +243,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/ */
public int getArrowsInBody(); public int getArrowsInBody();
@ -56,7 +56,7 @@ index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..eb8dcf3dc9acb171fec5b25342a9a38d
/** /**
* Returns the living entity's current maximum no damage ticks. * Returns the living entity's current maximum no damage ticks.
@@ -749,4 +781,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -775,4 +807,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return Whether the entity is invisible * @return Whether the entity is invisible
*/ */
public boolean isInvisible(); public boolean isInvisible();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Arrow pickup rule API
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
index 5b50a4e10e8ace8cc53ad3c8d7c3185f88d5c8db..e8e56e89e32d84af0639fe2e9b0eeabd747b6007 100644 index 9a0a1fa4b7a7e1e1174a75a388081b332d4bedbd..839e5b7df49f42b5fec7729997bef3370ba36d80 100644
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java --- a/src/main/java/org/bukkit/entity/AbstractArrow.java
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java +++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
@@ -141,4 +141,38 @@ public interface AbstractArrow extends Projectile { @@ -160,4 +160,38 @@ public interface AbstractArrow extends Projectile {
*/ */
CREATIVE_ONLY CREATIVE_ONLY
} }

Datei anzeigen

@ -142,10 +142,10 @@ index e3136651ce083e67a1a7cb976d27df5666843401..50e8c25cc378b02b09ef57643cc753fa
* @return an array containing all previous players * @return an array containing all previous players
*/ */
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc7c69e20a 100644 index 2b38b328187b853f5b36d796d3b6b359497647d8..a55e92dc09202437abac9cb5b7aacf3c275f5b9c 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2714,7 +2714,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2723,7 +2723,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/** /**
* Find the closest nearby structure of a given {@link StructureType}. * Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is * Finding unexplored structures can, and will, block if the world is
@ -154,7 +154,7 @@ index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc
* temporarily freezing while locating an unexplored structure. * temporarily freezing while locating an unexplored structure.
* <p> * <p>
* The {@code radius} is not a rigid square radius. Each structure may alter * The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2748,7 +2748,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2757,7 +2757,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/** /**
* Find the closest nearby structure of a given {@link StructureType}. * Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is * Finding unexplored structures can, and will, block if the world is
@ -163,7 +163,7 @@ index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc
* temporarily freezing while locating an unexplored structure. * temporarily freezing while locating an unexplored structure.
* <p> * <p>
* The {@code radius} is not a rigid square radius. Each structure may alter * The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2781,7 +2781,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2790,7 +2790,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/** /**
* Find the closest nearby structure of a given {@link Structure}. Finding * Find the closest nearby structure of a given {@link Structure}. Finding
* unexplored structures can, and will, block if the world is looking in * unexplored structures can, and will, block if the world is looking in
@ -369,7 +369,7 @@ index 1e56aef9188487d3e9c737e85025f601ab359a72..92cd35c87bad578c2b714761c93a5b72
*/ */
LAND_ON_PORTAL, LAND_ON_PORTAL,
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 09936f3a2376a46721bbc8365c989581c2a789ef..3845a726adbd0e75d7bf2aeeb6da8cb571d51a8f 100644 index fffc478312566bc5c36dbacbdd86341d84d50054..8d97cf229ce1d14232d0342121b5db2230795a1d 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable; @@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
@ -976,7 +976,7 @@ index 0cc6e29a5af28e95f87f415d6b2424d4622a6f34..c0b749a5bbf4980d01fed74768bb6190
* @param z the z location in the chunk from 0-15 inclusive * @param z the z location in the chunk from 0-15 inclusive
* @return Biome value * @return Biome value
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf22b50ab7e 100644 index 9adc827bc52eaa767a39c82e9cb0ff5a48e02b14..2dde946443fee1f6e79b882cbcb448549dc0c99c 100644
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
+++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java
@@ -37,9 +37,23 @@ public interface EntityEquipment { @@ -37,9 +37,23 @@ public interface EntityEquipment {
@ -1160,13 +1160,10 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
ItemStack getBoots(); ItemStack getBoots();
/** /**
@@ -202,12 +296,25 @@ public interface EntityEquipment { @@ -204,12 +298,25 @@ public interface EntityEquipment {
void setBoots(@Nullable ItemStack boots, boolean silent);
/** /**
- * Gets a copy of all worn armor * Gets all ItemStacks from the armor slots.
+ * Gets all worn armor *
+ *
+ * <p> + * <p>
+ * This returns a copy if this equipment instance is from a non-player, + * This returns a copy if this equipment instance is from a non-player,
+ * or it's an empty stack (has AIR as its type). + * or it's an empty stack (has AIR as its type).
@ -1180,8 +1177,10 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
+ * equipment.getArmorContents(); // will return an array of copies + * equipment.getArmorContents(); // will return an array of copies
+ * } + * }
+ * }</pre> + * }</pre>
* + *
* @return The array of worn armor. Individual items may be null. * @return all the ItemStacks from the armor slots. Individual items can be
* null and are returned in a fixed order starting from the boots and going
* up to the helmet
*/ */
- @NotNull - @NotNull
- ItemStack[] getArmorContents(); - ItemStack[] getArmorContents();
@ -1189,7 +1188,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
/** /**
* Sets the entities armor to the provided array of ItemStacks * Sets the entities armor to the provided array of ItemStacks
@@ -247,7 +354,8 @@ public interface EntityEquipment { @@ -249,7 +356,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1199,7 +1198,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return chance of the currently held item being dropped (1 for non-{@link Mob}) * @return chance of the currently held item being dropped (1 for non-{@link Mob})
@@ -260,7 +368,8 @@ public interface EntityEquipment { @@ -262,7 +370,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1209,7 +1208,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @param chance the chance of the main hand item being dropped * @param chance the chance of the main hand item being dropped
@@ -274,7 +383,8 @@ public interface EntityEquipment { @@ -276,7 +385,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1219,7 +1218,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return chance of the off hand item being dropped (1 for non-{@link Mob}) * @return chance of the off hand item being dropped (1 for non-{@link Mob})
@@ -287,7 +397,8 @@ public interface EntityEquipment { @@ -289,7 +399,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1229,7 +1228,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @param chance the chance of off hand item being dropped * @param chance the chance of off hand item being dropped
@@ -300,7 +411,8 @@ public interface EntityEquipment { @@ -302,7 +413,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1239,7 +1238,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return the chance of the helmet being dropped (1 for non-{@link Mob}) * @return the chance of the helmet being dropped (1 for non-{@link Mob})
@@ -312,7 +424,8 @@ public interface EntityEquipment { @@ -314,7 +426,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1249,7 +1248,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @param chance of the helmet being dropped * @param chance of the helmet being dropped
@@ -326,7 +439,8 @@ public interface EntityEquipment { @@ -328,7 +441,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1259,7 +1258,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return the chance of the chest plate being dropped (1 for non-{@link Mob}) * @return the chance of the chest plate being dropped (1 for non-{@link Mob})
@@ -339,7 +453,8 @@ public interface EntityEquipment { @@ -341,7 +455,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1269,7 +1268,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @param chance of the chest plate being dropped * @param chance of the chest plate being dropped
@@ -353,7 +468,8 @@ public interface EntityEquipment { @@ -355,7 +470,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1279,7 +1278,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return the chance of the leggings being dropped (1 for non-{@link Mob}) * @return the chance of the leggings being dropped (1 for non-{@link Mob})
@@ -366,7 +482,8 @@ public interface EntityEquipment { @@ -368,7 +484,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1289,7 +1288,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @param chance chance of the leggings being dropped * @param chance chance of the leggings being dropped
@@ -379,7 +496,8 @@ public interface EntityEquipment { @@ -381,7 +498,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1299,7 +1298,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2
* </ul> * </ul>
* *
* @return the chance of the boots being dropped (1 for non-{@link Mob}) * @return the chance of the boots being dropped (1 for non-{@link Mob})
@@ -391,7 +509,8 @@ public interface EntityEquipment { @@ -393,7 +511,8 @@ public interface EntityEquipment {
* *
* <ul> * <ul>
* <li>A drop chance of 0.0F will never drop * <li>A drop chance of 0.0F will never drop
@ -1323,10 +1322,10 @@ index 42fcc31147934fd4ed6484b0729e938e7ae2f8e2..4e637420b9a39b822be19367a16da93f
HIDE_ARMOR_TRIM; HIDE_ARMOR_TRIM;
} }
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5fe1e3825 100644 index f1918027c3a8735b31566856218611656b56db20..476fe14faa39f02444cab8ad95d4401033dc6938 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -158,7 +158,7 @@ public interface PlayerInventory extends Inventory { @@ -160,7 +160,7 @@ public interface PlayerInventory extends Inventory {
public void setBoots(@Nullable ItemStack boots); public void setBoots(@Nullable ItemStack boots);
/** /**
@ -1335,7 +1334,7 @@ index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5
* in their main hand. * in their main hand.
* *
* @return the currently held item * @return the currently held item
@@ -174,7 +174,7 @@ public interface PlayerInventory extends Inventory { @@ -176,7 +176,7 @@ public interface PlayerInventory extends Inventory {
void setItemInMainHand(@Nullable ItemStack item); void setItemInMainHand(@Nullable ItemStack item);
/** /**
@ -1344,7 +1343,7 @@ index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5
* in their off hand. * in their off hand.
* *
* @return the currently held item * @return the currently held item
@@ -190,7 +190,7 @@ public interface PlayerInventory extends Inventory { @@ -192,7 +192,7 @@ public interface PlayerInventory extends Inventory {
void setItemInOffHand(@Nullable ItemStack item); void setItemInOffHand(@Nullable ItemStack item);
/** /**

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 3845a726adbd0e75d7bf2aeeb6da8cb571d51a8f..abdca9fe5acc90f167219eb769ece66c35682bb1 100644 index 8d97cf229ce1d14232d0342121b5db2230795a1d..c426bdea5ef71a095cf2af9a8a83a162db3c05b7 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -339,6 +339,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -329,6 +329,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/ */
public int getExpToLevel(); public int getExpToLevel();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b67e6eca393b66c92fc62b35123bb3eb2f372b7c..c8c88c08d2f03cff267e76749156c584bf7adf42 100644 index 10eeb304bc0785e0ea182ac99d32ed2554b4755f..40634f46fa238a68f70f19b664bad7400ef07709 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -339,6 +339,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -365,6 +365,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Nullable @Nullable
public Player getKiller(); public Player getKiller();

Datei anzeigen

@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction. several layers of logging abstraction.
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index ddc89dfd6911d85aab7c37fe3ca54eb1b80f99d6..66bcd8f9a8fce8f920a0f1dd7ae0a2937da68e80 100644 index f9a9066e3e6a355acd5ddb3b0308b5b3b36b82f2..04853c43b99951bf0d4c96ef73724625bdaf018f 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -12,6 +12,8 @@ java { @@ -12,6 +12,8 @@ java {
@ -33,8 +33,8 @@ index ddc89dfd6911d85aab7c37fe3ca54eb1b80f99d6..66bcd8f9a8fce8f920a0f1dd7ae0a293
+ api("org.apache.logging.log4j:log4j-api:$log4jVersion") + api("org.apache.logging.log4j:log4j-api:$log4jVersion")
+ api("org.slf4j:slf4j-api:$slf4jVersion") + api("org.slf4j:slf4j-api:$slf4jVersion")
implementation("org.ow2.asm:asm:9.5") implementation("org.ow2.asm:asm:9.7")
implementation("org.ow2.asm:asm-commons:9.5") implementation("org.ow2.asm:asm-commons:9.7")
@@ -137,6 +141,8 @@ tasks.withType<Javadoc> { @@ -137,6 +141,8 @@ tasks.withType<Javadoc> {
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/", "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f463c2234 100644 index c426bdea5ef71a095cf2af9a8a83a162db3c05b7..2308fa3ca898bcb6c0ac2d4853f82a3398bf51f3 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -500,6 +500,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -490,6 +490,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/ */
@Deprecated @Deprecated
public void setShoulderEntityRight(@Nullable Entity entity); public void setShoulderEntityRight(@Nullable Entity entity);

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 6decacdf85827305dbee9d34dadef4bc7c69e20a..fa4081c62f86245fef5a273f01837f9ac6998faa 100644 index a55e92dc09202437abac9cb5b7aacf3c275f5b9c..e2cd4750ec51da5e6a93f31a9b644516f64f7972 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
@ -19,7 +19,7 @@ index 6decacdf85827305dbee9d34dadef4bc7c69e20a..fa4081c62f86245fef5a273f01837f9a
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@@ -627,6 +630,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -636,6 +639,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull @NotNull
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes); public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);

Datei anzeigen

@ -523,10 +523,10 @@ index ca6d0eaa9d9a37c07f3e1630b83a79bf98211edb..26d02aa5da444112f8fa84c07e3080bb
* Options which can be applied to redstone dust particles - a particle * Options which can be applied to redstone dust particles - a particle
* color and size. * color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index fa4081c62f86245fef5a273f01837f9ac6998faa..fa31ba9d30cd0d1b23e15667c4c9bd9c13b5b9d3 100644 index e2cd4750ec51da5e6a93f31a9b644516f64f7972..6f084f081bd20b006c9a8e1090b6ad0e838810cb 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2896,7 +2896,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2905,7 +2905,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null, * @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()} * the type of this depends on {@link Particle#getDataType()}
*/ */

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index c8c88c08d2f03cff267e76749156c584bf7adf42..dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9 100644 index 40634f46fa238a68f70f19b664bad7400ef07709..4a4a749449bc561a73e6747386c8ad51e623fc1e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -809,5 +809,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -835,5 +835,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/ */
@Deprecated @Deprecated
void setArrowsStuck(int arrows); void setArrowsStuck(int arrows);

Datei anzeigen

@ -108,10 +108,10 @@ index 3161eae2fa5f03b7d3a5e9945ab659c15cf568c6..af737017ee397f80c44ee02c6cc60cef
/** /**
* Returns a list of entities within a bounding box centered around a Location. * Returns a list of entities within a bounding box centered around a Location.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index fa31ba9d30cd0d1b23e15667c4c9bd9c13b5b9d3..ab0f76c74205f2fe1faf9aecc57ac3fb57431b06 100644 index 6f084f081bd20b006c9a8e1090b6ad0e838810cb..5ec220aa224c210c55517ef47aa5809ee26209e7 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1382,6 +1382,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -1391,6 +1391,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/ */
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);

Datei anzeigen

@ -0,0 +1,160 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:19:19 -0400
Subject: [PATCH] LivingEntity Active Item API
API relating to items being actively used by a LivingEntity
such as a bow or eating food.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 2308fa3ca898bcb6c0ac2d4853f82a3398bf51f3..15115b1049bc5053796b84539acbf576bcba1a5f 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -319,7 +319,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
* blocking).
*
* @return Whether their hand is raised
+ * @see LivingEntity#hasActiveItem()
*/
+ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") // Paper - active item API
public boolean isHandRaised();
/**
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 4a4a749449bc561a73e6747386c8ad51e623fc1e..c75315b921a1854fbbdbe8ecdfba7dacdaa155c1 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -202,15 +202,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*
* @return the item being used by the player, or null if they are not using
* an item
+ * @deprecated Use {@link #getActiveItem()}
*/
@Nullable
+ @Deprecated(forRemoval = true, since = "1.20.4") // Paper
public ItemStack getItemInUse();
/**
* Gets the number of ticks remaining for the current item's usage.
*
* @return The number of ticks remaining
+ * @deprecated use {@link #getActiveItemRemainingTime()}
*/
+ @Deprecated(forRemoval = true, since = "1.20.4") // Paper
public int getItemInUseTicks();
/**
@@ -219,7 +223,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* or throwing a trident.
*
* @param ticks The number of ticks remaining
+ * @deprecated use {@link #setActiveItemRemainingTime(int)}
*/
+ @Deprecated(forRemoval = true, since = "1.20.4") // Paper
public void setItemInUseTicks(int ticks);
/**
@@ -850,4 +856,101 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setShieldBlockingDelay(int delay);
// Paper end
+
+ // Paper start - active item API
+ /**
+ * Gets the item being actively "used" or consumed.
+ *
+ * @return the item
+ */
+ org.bukkit.inventory.@NotNull ItemStack getActiveItem();
+
+ /**
+ * Gets the remaining number of ticks for {@link #getActiveItem()}'s usage.
+ *
+ * @return remaining ticks to use {@link #getActiveItem()}
+ */
+ int getActiveItemRemainingTime();
+
+ /**
+ * Sets the number of ticks that remain for {@link #getActiveItem()}'s
+ * usage.
+ * <p>
+ * Valid values are between 0 and the max item use duration for
+ * the specific item type.
+ *
+ * @param ticks time in ticks remaining
+ */
+ void setActiveItemRemainingTime(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks);
+
+ /**
+ * Gets if the entity is using an item (eating, drinking, etc).
+ *
+ * @return true if using an item
+ */
+ boolean hasActiveItem();
+
+ /**
+ * Get how long the {@link #getActiveItem()} has been in use for.
+ *
+ * @return time used in ticks
+ */
+ int getActiveItemUsedTime();
+
+ /**
+ * Get the hand using the active item. Will be either
+ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or
+ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}.
+ *
+ * @return the hand being used
+ */
+ org.bukkit.inventory.@NotNull EquipmentSlot getActiveItemHand();
+
+ /**
+ * Gets remaining time a player needs to keep hands raised with an item to finish using it.
+ *
+ * @return remaining ticks to use the item
+ * @see #getActiveItemRemainingTime()
+ */
+ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4")
+ default int getItemUseRemainingTime() {
+ return this.getActiveItemRemainingTime();
+ }
+
+ /**
+ * Get how long the entity's hands have been raised (Charging Bow attack, using a potion, etc)
+ *
+ * @return Get how long the players hands have been raised (Charging Bow attack, using a potion, etc)
+ * @see #getActiveItemUsedTime()
+ */
+ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4")
+ default int getHandRaisedTime() {
+ return this.getActiveItemUsedTime();
+ }
+
+ /**
+ * Whether this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
+ *
+ * @return whether this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
+ * @see #hasActiveItem()
+ */
+ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4")
+ default boolean isHandRaised() {
+ return this.hasActiveItem();
+ }
+
+ /**
+ * Gets the hand raised by this living entity. Will be either
+ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or
+ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}.
+ *
+ * @return the hand raised
+ * @see #getActiveItemHand()
+ */
+ @NotNull
+ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4")
+ default org.bukkit.inventory.EquipmentSlot getHandRaised() {
+ return this.getActiveItemHand();
+ }
+ // Paper end - active item API
}

Datei anzeigen

@ -1,68 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:19:19 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e14057038c153 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -328,7 +328,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*
* @return the item being used by the player, or null if they are not using
* an item
+ * @deprecated Deprecated in favor of {@link LivingEntity#getActiveItem()}
*/
+ @Deprecated // Paper
@Nullable
public ItemStack getItemInUse();
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9..fd98b9de7714e2082e521f29dc162003e3d39ee2 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -823,5 +823,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param delay Delay in ticks
*/
void setShieldBlockingDelay(int delay);
+
+ /**
+ * Get's the item being actively "used" or consumed.
+ * @return The item
+ */
+ @NotNull
+ org.bukkit.inventory.ItemStack getActiveItem();
+
+ /**
+ * Get's remaining time a player needs to keep hands raised with an item to finish using it.
+ * @return Remaining ticks to use the item
+ */
+ int getItemUseRemainingTime();
+
+ /**
+ * Get how long the players hands have been raised (Charging Bow attack, using a potion, etc)
+ *
+ * @return Get how long the players hands have been raised (Charging Bow attack, using a potion, etc)
+ */
+ int getHandRaisedTime();
+
+ /**
+ * Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
+ *
+ * @return Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
+ */
+ boolean isHandRaised();
+
+ /**
+ * Gets the hand raised by this living entity. Will be either
+ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or
+ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}.
+ *
+ * @return the hand raised
+ */
+ @NotNull
+ org.bukkit.inventory.EquipmentSlot getHandRaised();
// Paper end
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ab0f76c74205f2fe1faf9aecc57ac3fb57431b06..ad7e2b624d5929beee5268151bda3abe9dfbb786 100644 index 5ec220aa224c210c55517ef47aa5809ee26209e7..2aafd966778ee0f6adcbb3ea3772cb2104f8e687 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -896,6 +896,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -905,6 +905,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull @NotNull
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z); public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);

Datei anzeigen

@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not. to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 9e012c3c0671e5d0e55c243fdb4e14057038c153..d44c5a3fda0b159dc541246cb2fca8427cb38243 100644 index 15115b1049bc5053796b84539acbf576bcba1a5f..c66130be13bf01b5834a6391864b865c0123fa5c 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -179,6 +179,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -179,6 +179,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

Datei anzeigen

@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
Also adds utility methods to Entity to teleport asynchronously. Also adds utility methods to Entity to teleport asynchronously.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 25ff747e23e7373bb96ca9109df7e46cdefdcd2e..116bad653e92efbfd576f3b146c0a9e40afbbe10 100644 index 8bef6168caf0932a5a64cf69eb7988fa3191b13a..ab183821b93dcfed1e881b481f0a3166f465ecfb 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -941,6 +941,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -950,6 +950,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
} }
// Paper end - additional getNearbyEntities API // Paper end - additional getNearbyEntities API
@ -485,7 +485,7 @@ index 25ff747e23e7373bb96ca9109df7e46cdefdcd2e..116bad653e92efbfd576f3b146c0a9e4
* Get a list of all players in this World * Get a list of all players in this World
* *
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 77a706dde5995a8a6306b1d0a144dd37d580dea3..14e42959033919ff6409e48ddf01c0f15c28eb10 100644 index 57a1d07d0430019fd38c72b9f58c7145927ecd02..a0ed358156f9cbeb9e3cbb910ac17785edd30152 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -168,6 +168,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -168,6 +168,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 116bad653e92efbfd576f3b146c0a9e40afbbe10..bc0f09b2d555682d0bf7937e9aa6c97258e66635 100644 index ab183821b93dcfed1e881b481f0a3166f465ecfb..675dea2e1e9742043c18098774b9fde2e6f4602f 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1762,6 +1762,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -1771,6 +1771,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/ */
public void setFullTime(long time); public void setFullTime(long time);

Datei anzeigen

@ -598,7 +598,7 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114
return origin; return origin;
} }
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3d006ae18 100644 index 675dea2e1e9742043c18098774b9fde2e6f4602f..0023b9737353c3c7dcfb38a143761bd8c03acf0d 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -418,9 +418,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -418,9 +418,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@ -612,7 +612,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3
public boolean refreshChunk(int x, int z); public boolean refreshChunk(int x, int z);
/** /**
@@ -3745,6 +3744,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -3754,6 +3753,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
// Spigot start // Spigot start
@ -620,7 +620,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3
public class Spigot { public class Spigot {
/** /**
@@ -3778,7 +3778,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -3787,7 +3787,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
} }
} }
@ -632,7 +632,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3
Spigot spigot(); Spigot spigot();
// Spigot end // Spigot end
@@ -3996,9 +4000,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -4005,9 +4009,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Gets the dimension ID of this environment * Gets the dimension ID of this environment
* *
* @return dimension ID * @return dimension ID
@ -644,7 +644,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3
public int getId() { public int getId() {
return id; return id;
} }
@@ -4008,9 +4012,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -4017,9 +4021,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* *
* @param id The ID of the environment * @param id The ID of the environment
* @return The environment * @return The environment
@ -818,10 +818,10 @@ index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f22
+@Deprecated(forRemoval = true) // Paper +@Deprecated(forRemoval = true) // Paper
public interface LingeringPotion extends ThrownPotion { } public interface LingeringPotion extends ThrownPotion { }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b2f66f80c90b9d716f43f94166ca015bdfd3173e..030d3b1b1fee0906d6a0fb2a47031b8a94caaf89 100644 index 71a4dc422b9ff25dd9bac58e5996d9996c4bc479..582d6d8eed0b0145fa58c977013c4914e99c40a4 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -684,7 +684,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -716,7 +716,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* This may have unexpected results if the entity is not in water. * This may have unexpected results if the entity is not in water.
* *
* @param swimming True if the entity is swimming. * @param swimming True if the entity is swimming.
@ -1276,10 +1276,10 @@ index df81bac9ecff697f98941e5c8490e10391e90090..a32977ba3ba60a1c9aee6e469d5d6cd1
/** /**
* Get the current recipe formed on the crafting inventory, if any. * Get the current recipe formed on the crafting inventory, if any.
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
index 16bca8e40ff029cca94bbfd435db1cf22b50ab7e..2b11217153d6d6d8246d332e7fbbf32810d7e7b8 100644 index 2dde946443fee1f6e79b882cbcb448549dc0c99c..127302aa7c22f59438de66fffa0b03ae84a2a8ad 100644
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
+++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java
@@ -523,6 +523,6 @@ public interface EntityEquipment { @@ -525,6 +525,6 @@ public interface EntityEquipment {
* *
* @return the entity this EntityEquipment belongs to * @return the entity this EntityEquipment belongs to
*/ */
@ -1438,12 +1438,12 @@ index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970
return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone(); return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone();
} }
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa5486712ef3 100644 index 476fe14faa39f02444cab8ad95d4401033dc6938..2c54660dc1fbc7c1232096797a23cae1262888e9 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -14,8 +14,7 @@ public interface PlayerInventory extends Inventory { @@ -16,8 +16,7 @@ public interface PlayerInventory extends Inventory {
* * null and are returned in a fixed order starting from the boots and going
* @return All the ItemStacks from the armor slots. Individual items can be null. * up to the helmet
*/ */
- @NotNull - @NotNull
- public ItemStack[] getArmorContents(); - public ItemStack[] getArmorContents();
@ -1451,7 +1451,7 @@ index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa54
/** /**
* Get all additional ItemStacks stored in this inventory. * Get all additional ItemStacks stored in this inventory.
@@ -26,8 +25,7 @@ public interface PlayerInventory extends Inventory { @@ -28,8 +27,7 @@ public interface PlayerInventory extends Inventory {
* *
* @return All additional ItemStacks. Individual items can be null. * @return All additional ItemStacks. Individual items can be null.
*/ */
@ -1461,7 +1461,7 @@ index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa54
/** /**
* Return the ItemStack from the helmet slot * Return the ItemStack from the helmet slot
@@ -104,9 +102,9 @@ public interface PlayerInventory extends Inventory { @@ -106,9 +104,9 @@ public interface PlayerInventory extends Inventory {
* *
* @param slot the slot to get the ItemStack * @param slot the slot to get the ItemStack
* *
@ -1862,10 +1862,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
/** /**
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index b7c394fb70cc3449e5c9c5756956d9b048b5c019..3070f039a583647e7c9a8f15d63291cd265db9fc 100644 index 28dd05c706211f78eb27329a4284e2f21c5f5eb5..f97dff2fd90cc8c35cbde04d1ace81320a8e4658 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java --- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -239,9 +239,9 @@ public abstract class PotionEffectType implements Keyed { @@ -240,9 +240,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
* Returns the unique ID of this type. * Returns the unique ID of this type.
* *
* @return Unique ID * @return Unique ID
@ -1877,7 +1877,7 @@ index b7c394fb70cc3449e5c9c5756956d9b048b5c019..3070f039a583647e7c9a8f15d63291cd
public abstract int getId(); public abstract int getId();
/** /**
@@ -277,9 +277,9 @@ public abstract class PotionEffectType implements Keyed { @@ -278,9 +278,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
* *
* @param id Unique ID to fetch * @param id Unique ID to fetch
* @return Resulting type, or null if not found. * @return Resulting type, or null if not found.

Datei anzeigen

@ -61,14 +61,15 @@ index 0000000000000000000000000000000000000000..a6306c957fcacdcbcc8037b4ee33a167
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index c58f7b4a7c05e35056a478a818a9a6cdfe99203f..3f062e0fe9cb632dece9ce3fdc985ab1bf5a425f 100644 index 3e5b7dc8f72bd211a18ec6a930c4f02beea4205a..0a0e3fe33158f0424398c0abf50ea55825c452c5 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1025,5 +1025,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1118,4 +1118,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/ return this.getActiveItemHand();
@NotNull }
org.bukkit.inventory.EquipmentSlot getHandRaised(); // Paper end - active item API
+ +
+ // Paper start - entity jump API
+ /** + /**
+ * Get entity jump state. + * Get entity jump state.
+ * <p> + * <p>
@ -88,5 +89,5 @@ index c58f7b4a7c05e35056a478a818a9a6cdfe99203f..3f062e0fe9cb632dece9ce3fdc985ab1
+ * @param jumping entity jump state + * @param jumping entity jump state
+ */ + */
+ void setJumping(boolean jumping); + void setJumping(boolean jumping);
// Paper end + // Paper end - entity jump API
} }

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format. Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 688fccdbc5cf831008ef2f27db9d15b0921a7561..e4861a8be534bfeae0385f0197261fa6ec1e7bc0 100644 index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14f47b341a 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -151,5 +151,9 @@ public interface UnsafeValues { @@ -153,5 +153,9 @@ public interface UnsafeValues {
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher(); return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
} }

Datei anzeigen

@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index d44c5a3fda0b159dc541246cb2fca8427cb38243..7e9e1e0b21314e6542f5f40503cd6926c75cc369 100644 index c66130be13bf01b5834a6391864b865c0123fa5c..2557ddcc0528d4f9d811883b3ddc61148ebc3998 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -269,6 +269,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -269,6 +269,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

Datei anzeigen

@ -5,14 +5,15 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 10d76fcd509702042c528fab96b963e9c6d210a5..3969f3c188211838cb576465bd64c0f63ae85080 100644 index 0a0e3fe33158f0424398c0abf50ea55825c452c5..d9dee0486c5f7c9a948a2c1a3497e2745d747965 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1045,5 +1045,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1140,4 +1140,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param jumping entity jump state
*/ */
void setJumping(boolean jumping); void setJumping(boolean jumping);
// Paper end - entity jump API
+ +
+ // Paper start - pickup animation API
+ /** + /**
+ * Plays pickup item animation towards this entity. + * Plays pickup item animation towards this entity.
+ * <p> + * <p>
@ -35,5 +36,5 @@ index 10d76fcd509702042c528fab96b963e9c6d210a5..3969f3c188211838cb576465bd64c0f6
+ * @param quantity quantity of item + * @param quantity quantity of item
+ */ + */
+ void playPickupItemAnimation(@NotNull Item item, int quantity); + void playPickupItemAnimation(@NotNull Item item, int quantity);
// Paper end + // Paper end - pickup animation API
} }

Datei anzeigen

@ -233,26 +233,28 @@ index e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d1
String getTranslationKey(); String getTranslationKey();
} }
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
index 36501052de5ad0b80aa1dcbe97d44dd3204f749b..37f93b7e9f722e76631c3e7d3e770526ee0c3926 100644 index 7d5e6961e7e836f57cb7114ae7cef9dbd95ad0a1..66027c2ea32d44a5d2df18d6414668d847f6fd9c 100644
--- a/src/main/java/org/bukkit/attribute/Attribute.java --- a/src/main/java/org/bukkit/attribute/Attribute.java
+++ b/src/main/java/org/bukkit/attribute/Attribute.java +++ b/src/main/java/org/bukkit/attribute/Attribute.java
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull; @@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/** /**
* Types of attributes which may be present on an {@link Attributable}. * Types of attributes which may be present on an {@link Attributable}.
*/ */
-public enum Attribute implements Keyed { -public enum Attribute implements Keyed, Translatable {
+public enum Attribute implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations +public enum Attribute implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
/** /**
* Maximum health of an Entity. * Maximum health of an Entity.
@@ -77,4 +77,10 @@ public enum Attribute implements Keyed { @@ -85,4 +85,12 @@ public enum Attribute implements Keyed, Translatable {
public NamespacedKey getKey() { public String getTranslationKey() {
return key; return Bukkit.getUnsafe().getTranslationKey(this);
} }
+
+ // Paper start + // Paper start
+ @SuppressWarnings("deprecation")
+ @Override + @Override
+ public @NotNull String translationKey() { + public @NotNull String translationKey() {
+ return "attribute.name." + this.key.getKey(); + return Bukkit.getUnsafe().getTranslationKey(this);
+ } + }
+ // Paper end + // Paper end
} }
@ -308,15 +310,15 @@ index bf29d9b733afc7c62725d259f4920c4f211cc6d0..1d3812db989a55b6f31bb30dffe70323
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index 6a915b5b41daa5ea64913a2d5c611a6167168395..4a88198be6634b47fc51e55acc5f6415e4aff1ab 100644 index 350d52f4dd97a7e6a6a9a967e1c6a8781feda22e..13f25ff4a4dd5a98f5f690c54e5cba6ef145c2d0 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java --- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable; @@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
/** /**
* The various type of enchantments that may be added to armour or weapons * The various type of enchantments that may be added to armour or weapons
*/ */
-public abstract class Enchantment implements Keyed { -public abstract class Enchantment implements Keyed, Translatable {
+public abstract class Enchantment implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations +public abstract class Enchantment implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
/** /**
* Provides protection against environmental damage * Provides protection against environmental damage
*/ */

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add additional open container api to HumanEntity
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 7e9e1e0b21314e6542f5f40503cd6926c75cc369..94f2c3167f4ce7f5f2b4ecc067739c64af0a2508 100644 index 2557ddcc0528d4f9d811883b3ddc61148ebc3998..5ecfb98540c00da05b13bc5370debb89c52cc76f 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -174,6 +174,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -174,6 +174,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index e4861a8be534bfeae0385f0197261fa6ec1e7bc0..86bb2a6f46c7c39e7ac1923c3454785a3dc76648 100644 index 30d869a7c4bba79b4c05de7860b31c14f47b341a..241cb853476ea35dad73d0234b2d030e9af23476 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -155,5 +155,12 @@ public interface UnsafeValues { @@ -157,5 +157,12 @@ public interface UnsafeValues {
byte[] serializeItem(ItemStack item); byte[] serializeItem(ItemStack item);
ItemStack deserializeItem(byte[] data); ItemStack deserializeItem(byte[] data);

Datei anzeigen

@ -5,20 +5,18 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 3969f3c188211838cb576465bd64c0f63ae85080..9d58da4686a22893455b9cc75fb8e73a87d2d06d 100644 index 898cbd4f690777ce855244331f95e624c6a1fbd4..66dfeb4490505a3eaed547dd86e6c68b85ba5568 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -996,6 +996,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1030,6 +1030,11 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull */
org.bukkit.inventory.ItemStack getActiveItem(); org.bukkit.inventory.@NotNull ItemStack getActiveItem();
+ // Paper start
+ /** + /**
+ * Interrupts any ongoing active "usage" or consumption or an item. + * Interrupts any ongoing active "usage" or consumption or an item.
+ */ + */
+ void clearActiveItem(); + void clearActiveItem();
+ // Paper end
+ +
/** /**
* Get's remaining time a player needs to keep hands raised with an item to finish using it. * Gets the remaining number of ticks for {@link #getActiveItem()}'s usage.
* @return Remaining ticks to use the item *

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50daea5086a 100644 index 5ecfb98540c00da05b13bc5370debb89c52cc76f..083d5798ccc7f37c6df5e234c7ef233202102b8f 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -348,6 +348,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -348,6 +348,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
@ -26,14 +26,15 @@ index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50d
* Get the sleep ticks of the player. This value may be capped. * Get the sleep ticks of the player. This value may be capped.
* *
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 9d58da4686a22893455b9cc75fb8e73a87d2d06d..e9919fce380ec1d0d48b3ac706e7fd31af0be26b 100644 index 546ecf762d588b8a8239c832fbbe96b8714a07cb..8d2a74e17e4b7089ff91d263b669e8623d7e688a 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1075,5 +1075,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1170,4 +1170,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param quantity quantity of item
*/ */
void playPickupItemAnimation(@NotNull Item item, int quantity); void playPickupItemAnimation(@NotNull Item item, int quantity);
// Paper end - pickup animation API
+ +
+ // Paper start - hurt direction API
+ /** + /**
+ * Gets player hurt direction + * Gets player hurt direction
+ * + *
@ -49,5 +50,5 @@ index 9d58da4686a22893455b9cc75fb8e73a87d2d06d..e9919fce380ec1d0d48b3ac706e7fd31
+ */ + */
+ @Deprecated + @Deprecated
+ void setHurtDirection(float hurtDirection); + void setHurtDirection(float hurtDirection);
// Paper end + // Paper end - hurt direction API
} }

Datei anzeigen

@ -78,10 +78,10 @@ index 3c64eb18b7cb6ac371b094a581da8a033e90d00f..c3e0b40a845a30790f31a0cf591bfa7f
* Create a new virtual {@link WorldBorder}. * Create a new virtual {@link WorldBorder}.
* <p> * <p>
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 86bb2a6f46c7c39e7ac1923c3454785a3dc76648..72a29fff4c497a2a66e2746ad42553bcb712e20d 100644 index 241cb853476ea35dad73d0234b2d030e9af23476..5de86f8cd3cc7f7e8ebc4a22d3921273378704f2 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -162,5 +162,10 @@ public interface UnsafeValues { @@ -164,5 +164,10 @@ public interface UnsafeValues {
* Use this when sending custom packets, so that there are no collisions on the client or server. * Use this when sending custom packets, so that there are no collisions on the client or server.
*/ */
public int nextEntityId(); public int nextEntityId();

Datei anzeigen

@ -61,10 +61,10 @@ index 85604d2c364c41fed24257a9b02ceeb58712f6a2..8fd928cfe61ab6f06c52eb5e4561fd68
/** /**
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 72a29fff4c497a2a66e2746ad42553bcb712e20d..22db1d8645a450308fe91d0cd100c926dd8c6f08 100644 index 5de86f8cd3cc7f7e8ebc4a22d3921273378704f2..c423204eaf3252c9fc1a3af1214ec70ed712fb80 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -167,5 +167,22 @@ public interface UnsafeValues { @@ -169,5 +169,22 @@ public interface UnsafeValues {
* Just don't use it. * Just don't use it.
*/ */
@org.jetbrains.annotations.NotNull String getMainLevelName(); @org.jetbrains.annotations.NotNull String getMainLevelName();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 22db1d8645a450308fe91d0cd100c926dd8c6f08..a3810c693d3748fba818e4a835ceb77762f433b9 100644 index c423204eaf3252c9fc1a3af1214ec70ed712fb80..42e4983051062f2fd3b595487cf8093440b41bba 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -184,5 +184,12 @@ public interface UnsafeValues { @@ -186,5 +186,12 @@ public interface UnsafeValues {
* @return the itemstack rarity * @return the itemstack rarity
*/ */
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack); public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 4054d2c836342f0e4bcbd33adb13f50daea5086a..ff1ebe184ba5a1bdc8e2784025b07d3bb90a5078 100644 index 083d5798ccc7f37c6df5e234c7ef233202102b8f..a47ea595c2a23b361a56f13877b67892ecfed826 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -358,6 +358,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -358,6 +358,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] add get-set drop chance to EntityEquipment
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
index 2b11217153d6d6d8246d332e7fbbf32810d7e7b8..bbc1aa3a317fd0a0a0060b30aae42567cda471ca 100644 index 127302aa7c22f59438de66fffa0b03ae84a2a8ad..1b34286fb6cbedb3841c84c499eb626f61885126 100644
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
+++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java
@@ -525,4 +525,34 @@ public interface EntityEquipment { @@ -527,4 +527,34 @@ public interface EntityEquipment {
*/ */
@NotNull // Paper @NotNull // Paper
Entity getHolder(); Entity getHolder();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 24ce9966140730c581c0709b14280e62a58331fa..d09c6b7c7b80f1f59e052ddb4aa8ad05b63fca2b 100644 index 0a7c97aa289687cfbf6ae1a222f5eb2850f8f43e..4f724c337da08da6bbc8b1452dbd64eefd54a879 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -3824,6 +3824,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -3833,6 +3833,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable @Nullable
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index a3810c693d3748fba818e4a835ceb77762f433b9..d9e3e4ad108a94ac6f0f5378d22d47845091efb4 100644 index 42e4983051062f2fd3b595487cf8093440b41bba..057f4db9cb6b686ab941ec5d3e6ca23dcfbd845f 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -185,6 +185,16 @@ public interface UnsafeValues { @@ -187,6 +187,16 @@ public interface UnsafeValues {
*/ */
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack); public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);

Datei anzeigen

@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..e6a40c1fcea761bd66743b50e3da3d14
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index 4a88198be6634b47fc51e55acc5f6415e4aff1ab..d50d4c3121a966adcc47173ddb4575f7ad504148 100644 index 13f25ff4a4dd5a98f5f690c54e5cba6ef145c2d0..4264c6eb7e5794019859cfca592b57e574fcd833 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java --- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -269,11 +269,7 @@ public abstract class Enchantment implements Keyed, net.kyori.adventure.translat @@ -270,11 +270,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
* Cursed enchantments are found the same way treasure enchantments are * Cursed enchantments are found the same way treasure enchantments are
* *
* @return true if the enchantment is cursed * @return true if the enchantment is cursed
@ -51,7 +51,7 @@ index 4a88198be6634b47fc51e55acc5f6415e4aff1ab..d50d4c3121a966adcc47173ddb4575f7
public abstract boolean isCursed(); public abstract boolean isCursed();
/** /**
@@ -307,6 +303,70 @@ public abstract class Enchantment implements Keyed, net.kyori.adventure.translat @@ -308,6 +304,70 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
* @return the name of the enchantment with {@code level} applied * @return the name of the enchantment with {@code level} applied
*/ */
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level); public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);

Datei anzeigen

@ -31,10 +31,10 @@ index 8fd928cfe61ab6f06c52eb5e4561fd6860e1f8d9..64ca3c676703eed55b4ac8a2d4561d48
/** /**
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index d9e3e4ad108a94ac6f0f5378d22d47845091efb4..bdee63fb97cbc0c9fbe7df74de5cb5f4ed7de3ca 100644 index 057f4db9cb6b686ab941ec5d3e6ca23dcfbd845f..db8ffa9b303b9128be175f383fdf838a4e0719e5 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -195,6 +195,18 @@ public interface UnsafeValues { @@ -197,6 +197,18 @@ public interface UnsafeValues {
*/ */
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial); public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);

Datei anzeigen

@ -23,10 +23,10 @@ index d8b1fa79dc24138dc71e32c14bda71c1d570ed88..b68367f123f029c3ff47eab6bfabd7a8
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index e9919fce380ec1d0d48b3ac706e7fd31af0be26b..b1fb059fc2249814c9e509c219da2aed84d34fe0 100644 index 0ed9ad6ed755c5b46ec16e33c3d56e7f80345066..99f314f25d1d6118e0884822d428c47060373bec 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -590,6 +590,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -622,6 +622,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/ */
public boolean hasLineOfSight(@NotNull Entity other); public boolean hasLineOfSight(@NotNull Entity other);

Datei anzeigen

@ -585,10 +585,10 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc5285ca17 100644 index 99f314f25d1d6118e0884822d428c47060373bec..13eb80455dd589e87c39a7a5570ef093c7660205 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -960,6 +960,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -992,6 +992,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* *
* @param invisible If the entity is invisible * @param invisible If the entity is invisible
*/ */
@ -596,7 +596,7 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc
public void setInvisible(boolean invisible); public void setInvisible(boolean invisible);
/** /**
@@ -967,6 +968,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -999,6 +1000,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* *
* @return Whether the entity is invisible * @return Whether the entity is invisible
*/ */
@ -604,11 +604,11 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc
public boolean isInvisible(); public boolean isInvisible();
// Paper start // Paper start
@@ -1016,6 +1018,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1035,6 +1037,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
void clearActiveItem(); void setShieldBlockingDelay(int delay);
// Paper end // Paper end
+ // Paper start + // Paper start - missing entity API
+ /** + /**
+ * Retrieves the sideways movement direction of the entity. + * Retrieves the sideways movement direction of the entity.
+ * <p> + * <p>
@ -657,11 +657,11 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc
+ * @return Forwards movement direction, ranging from -1 (backward) to 1 (forward). + * @return Forwards movement direction, ranging from -1 (backward) to 1 (forward).
+ */ + */
+ float getForwardsMovement(); + float getForwardsMovement();
+ // Paper end + // Paper end - missing entity API
+ +
// Paper start - active item API
/** /**
* Get's remaining time a player needs to keep hands raised with an item to finish using it. * Gets the item being actively "used" or consumed.
* @return Remaining ticks to use the item
diff --git a/src/main/java/org/bukkit/entity/Llama.java b/src/main/java/org/bukkit/entity/Llama.java diff --git a/src/main/java/org/bukkit/entity/Llama.java b/src/main/java/org/bukkit/entity/Llama.java
index d23226ccb0f6c25028f000ce31346cd0a8898e6a..bc84b892cae5fe7019a3ad481e9da79956efa1fe 100644 index d23226ccb0f6c25028f000ce31346cd0a8898e6a..bc84b892cae5fe7019a3ad481e9da79956efa1fe 100644
--- a/src/main/java/org/bukkit/entity/Llama.java --- a/src/main/java/org/bukkit/entity/Llama.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index ff89fc699b7aaba982c59ace4effaffc5285ca17..41ca8fea2aede178bdbe87c05588bce4f2faf8e6 100644 index 13eb80455dd589e87c39a7a5570ef093c7660205..2727eef973a40b5d96f59671e0415e9544a0550c 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -419,6 +419,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -451,6 +451,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
int getNextArrowRemoval(); int getNextArrowRemoval();
// Paper end - Add methods for working with arrows stuck in living entities // Paper end - Add methods for working with arrows stuck in living entities

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index d09c6b7c7b80f1f59e052ddb4aa8ad05b63fca2b..6897600a6879d88cea287cde350c1e9cd11ae96d 100644 index 4f724c337da08da6bbc8b1452dbd64eefd54a879..5c61b9964e9abe76b5604c73bdd211a9c1c9b619 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -737,6 +737,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -746,6 +746,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull @NotNull
public LightningStrike strikeLightningEffect(@NotNull Location loc); public LightningStrike strikeLightningEffect(@NotNull Location loc);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index bdee63fb97cbc0c9fbe7df74de5cb5f4ed7de3ca..5d4721595a24c8c970f2500fc805c3efc4508157 100644 index db8ffa9b303b9128be175f383fdf838a4e0719e5..b205937d1cd627c1dd660277f69891b5412b1c16 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -213,5 +213,22 @@ public interface UnsafeValues { @@ -215,5 +215,22 @@ public interface UnsafeValues {
* @return the server's protocol version * @return the server's protocol version
*/ */
int getProtocolVersion(); int getProtocolVersion();

Datei anzeigen

@ -26,10 +26,10 @@ index 64ca3c676703eed55b4ac8a2d4561d483c6935b1..9f86ad25a57b3f6e6bda1ce657833837
/** /**
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 5d4721595a24c8c970f2500fc805c3efc4508157..434fde52986ba07d7209ff47483f74fe31e8ebe7 100644 index b205937d1cd627c1dd660277f69891b5412b1c16..ca0b126bff245ed3fe69bc49c28499f7a7aa9556 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -230,5 +230,14 @@ public interface UnsafeValues { @@ -232,5 +232,14 @@ public interface UnsafeValues {
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first) * @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
*/ */
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey); @org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 434fde52986ba07d7209ff47483f74fe31e8ebe7..0c7204e390f44b649fc26cd46152abeb2ad2d670 100644 index ca0b126bff245ed3fe69bc49c28499f7a7aa9556..6426d8585bba71b3e998b1eb078ac0fc67076d65 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -156,6 +156,14 @@ public interface UnsafeValues { @@ -158,6 +158,14 @@ public interface UnsafeValues {
ItemStack deserializeItem(byte[] data); ItemStack deserializeItem(byte[] data);
@ -24,7 +24,7 @@ index 434fde52986ba07d7209ff47483f74fe31e8ebe7..0c7204e390f44b649fc26cd46152abeb
* Creates and returns the next EntityId available. * Creates and returns the next EntityId available.
* <p> * <p>
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 9272c15619f623dc39d9c9046fd6463674c37264..9cb84eababf159b04618a605ff03cdaee72c9502 100644 index 578c22b0aef9c89a3c33b75c33bcdc60bdab6b49..621ee3fd49ee96143df2f24889e9aef74448a544 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -925,5 +925,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -925,5 +925,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent

Datei anzeigen

@ -41,19 +41,19 @@ index 4bc53793aade0887fa650a4bbf51d2e57678bd90..18c672f3855a329bf8f87a9de81b677e
/** /**
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index 3070f039a583647e7c9a8f15d63291cd265db9fc..0d81e2d36e01128b9c697ec6f5c98083ee492d84 100644 index f97dff2fd90cc8c35cbde04d1ace81320a8e4658..7d2f2fb6d4a786d15d61fde2ef03783b85d0c47b 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java --- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable; @@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
/** /**
* Represents a type of potion and its effect on an entity. * Represents a type of potion and its effect on an entity.
*/ */
-public abstract class PotionEffectType implements Keyed { -public abstract class PotionEffectType implements Keyed, Translatable {
+public abstract class PotionEffectType implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - implement Translatable +public abstract class PotionEffectType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - implement Translatable
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create(); private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
/** /**
@@ -351,4 +351,56 @@ public abstract class PotionEffectType implements Keyed { @@ -352,4 +352,56 @@ public abstract class PotionEffectType implements Keyed, Translatable {
return from; return from;
} }

Datei anzeigen

@ -6,14 +6,37 @@ Subject: [PATCH] More Projectile API
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..2d7521b71ec16e1b229bbe4c05d51673720df475 100644 index 839e5b7df49f42b5fec7729997bef3370ba36d80..b36298679d6d52d09fe4bb8e52e19e18f6df742a 100644
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java --- a/src/main/java/org/bukkit/entity/AbstractArrow.java
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java +++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
@@ -174,5 +174,43 @@ public interface AbstractArrow extends Projectile { @@ -130,17 +130,21 @@ public interface AbstractArrow extends Projectile {
ALLOWED, * Gets the ItemStack which will be picked up from this arrow.
*
* @return The picked up ItemStack
+ * @deprecated use {@link #getItemStack()}
*/
@NotNull
@ApiStatus.Experimental
+ @Deprecated(forRemoval = true, since = "1.20.4") // Paper
public ItemStack getItem();
/**
* Sets the ItemStack which will be picked up from this arrow.
*
* @param item ItemStack set to be picked up
+ * @deprecated until 1.20.5 when the behavior is more defined
*/
@ApiStatus.Experimental
+ @Deprecated // Paper - remove in 1.20.5
public void setItem(@NotNull ItemStack item);
/**
@@ -194,4 +198,44 @@ public interface AbstractArrow extends Projectile {
CREATIVE_ONLY; CREATIVE_ONLY;
} }
// Paper end
+ +
+ // Paper start - more projectile API
+ /** + /**
+ * Gets the ItemStack for this arrow. + * Gets the ItemStack for this arrow.
+ * + *
@ -51,7 +74,7 @@ index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..2d7521b71ec16e1b229bbe4c05d51673
+ * @param sound sound that is played + * @param sound sound that is played
+ */ + */
+ void setHitSound(@NotNull org.bukkit.Sound sound); + void setHitSound(@NotNull org.bukkit.Sound sound);
// Paper end + // Paper end - more projectile API
} }
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
index 0d31aa0b22cf1e849572294e2cfe38b48c9210af..217d348ad0bbef720b25d3b507a55ca8105b7731 100644 index 0d31aa0b22cf1e849572294e2cfe38b48c9210af..217d348ad0bbef720b25d3b507a55ca8105b7731 100644

Datei anzeigen

@ -10,10 +10,10 @@ Subject: [PATCH] Expand FallingBlock API
Co-authored-by: Lukas Planz <lukas.planz@web.de> Co-authored-by: Lukas Planz <lukas.planz@web.de>
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120aaf87f4f 100644 index 7ff0ac9c78c3793791afbfa344a9ced3821d9638..fa81e440ad20ab8740cb073f515d1671dc6ea9a0 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -2261,8 +2261,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2270,8 +2270,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The spawned {@link FallingBlock} instance * @return The spawned {@link FallingBlock} instance
* @throws IllegalArgumentException if {@link Location} or {@link * @throws IllegalArgumentException if {@link Location} or {@link
* MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block * MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block
@ -24,7 +24,7 @@ index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException; public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException;
/** /**
@@ -2275,8 +2277,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2284,8 +2286,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The spawned {@link FallingBlock} instance * @return The spawned {@link FallingBlock} instance
* @throws IllegalArgumentException if {@link Location} or {@link * @throws IllegalArgumentException if {@link Location} or {@link
* BlockData} are null * BlockData} are null
@ -35,7 +35,7 @@ index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull BlockData data) throws IllegalArgumentException; public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull BlockData data) throws IllegalArgumentException;
/** /**
@@ -2293,7 +2297,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -2302,7 +2306,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The spawned {@link FallingBlock} instance * @return The spawned {@link FallingBlock} instance
* @throws IllegalArgumentException if {@link Location} or {@link * @throws IllegalArgumentException if {@link Location} or {@link
* Material} are null or {@link Material} is not a block * Material} are null or {@link Material} is not a block

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Player#getFishHook
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index ff1ebe184ba5a1bdc8e2784025b07d3bb90a5078..8b0d04d5b39ee817555a36adddc39b18fc6f0d02 100644 index a47ea595c2a23b361a56f13877b67892ecfed826..ee866f3497ed56708d4062685f5585ca06a03955 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -386,6 +386,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -386,6 +386,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 0c7204e390f44b649fc26cd46152abeb2ad2d670..741ead65c89d4f9521d35dcbc9661d6772058499 100644 index 6426d8585bba71b3e998b1eb078ac0fc67076d65..d97e42de951527afb03eafc481704418dedffde9 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -247,5 +247,32 @@ public interface UnsafeValues { @@ -249,5 +249,32 @@ public interface UnsafeValues {
* @throws IllegalArgumentException if {@link Material#isBlock()} is false * @throws IllegalArgumentException if {@link Material#isBlock()} is false
*/ */
boolean isCollidable(@org.jetbrains.annotations.NotNull Material material); boolean isCollidable(@org.jetbrains.annotations.NotNull Material material);

Datei anzeigen

@ -5,14 +5,15 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 41ca8fea2aede178bdbe87c05588bce4f2faf8e6..aa20ec645476b2cbb0330c206f163094aebf238e 100644 index 7ed163813bb13ea6e1b60a94f4ef98b3b55f163c..ec3e597a9e683e5966ef4fff3300c30bde1dd49d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1203,5 +1203,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1300,4 +1300,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated @Deprecated
void setHurtDirection(float hurtDirection); void setHurtDirection(float hurtDirection);
// Paper end - hurt direction API
+ +
+ // Paper start - swing hand API
+ /** + /**
+ * Makes this entity swing their hand. + * Makes this entity swing their hand.
+ * + *
@ -30,5 +31,5 @@ index 41ca8fea2aede178bdbe87c05588bce4f2faf8e6..aa20ec645476b2cbb0330c206f163094
+ this.swingOffHand(); + this.swingOffHand();
+ } + }
+ } + }
// Paper end + // Paper end - swing hand API
} }

Datei anzeigen

@ -5,14 +5,15 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index aa20ec645476b2cbb0330c206f163094aebf238e..70953573a7bcfa682dbaeaa8e3db0c847b254fdd 100644 index ec3e597a9e683e5966ef4fff3300c30bde1dd49d..b5d882622d9b350b81b6c61348515cbc5aa65777 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1221,5 +1221,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1320,4 +1320,18 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
this.swingOffHand();
} }
} }
// Paper end - swing hand API
+ +
+ // Paper start - knockback API
+ /** + /**
+ * Knocks back this entity from a specific direction with a specified strength. Mechanics such + * Knocks back this entity from a specific direction with a specified strength. Mechanics such
+ * as knockback resistance will be factored in. + * as knockback resistance will be factored in.
@ -24,5 +25,5 @@ index aa20ec645476b2cbb0330c206f163094aebf238e..70953573a7bcfa682dbaeaa8e3db0c84
+ * @param directionZ The relative z position of the knockback source direction + * @param directionZ The relative z position of the knockback source direction
+ */ + */
+ void knockback(double strength, double directionX, double directionZ); + void knockback(double strength, double directionX, double directionZ);
// Paper end + // Paper end - knockback API
} }

Datei anzeigen

@ -8,14 +8,15 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241ddb8970907 100644 index b5d882622d9b350b81b6c61348515cbc5aa65777..6807354bf157060cbddb395dd6220040b84e7c8d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1233,5 +1233,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1334,4 +1334,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param directionZ The relative z position of the knockback source direction
*/ */
void knockback(double strength, double directionX, double directionZ); void knockback(double strength, double directionX, double directionZ);
// Paper end - knockback API
+ +
+ // Paper start - ItemStack damage API
+ /** + /**
+ * Notifies all clients tracking this entity that the item in + * Notifies all clients tracking this entity that the item in
+ * the slot of this entity broke. + * the slot of this entity broke.
@ -62,7 +63,7 @@ index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241dd
+ * @param amount the amount of damage to do + * @param amount the amount of damage to do
+ */ + */
+ void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount); + void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
// Paper end + // Paper end - ItemStack damage API
} }
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f236f9bfa4d43dcbad5919abef3620fcd0696880..845037909658884167136955a02b99af0040fa9c 100644 index f236f9bfa4d43dcbad5919abef3620fcd0696880..845037909658884167136955a02b99af0040fa9c 100644

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 909926485a66e09988f7787b1d5ee2cf9c012558..17d5a5458ee51d8db243326745875ef31ba95fb3 100644 index d6e4c7cdd34b03295825b3c5ad76626f8f48ec0e..11df702c6f8282aa96ae1ed6b9b29c81fbfadbad 100644
--- a/src/main/java/org/bukkit/entity/Entity.java --- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1020,6 +1020,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -1020,6 +1020,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@ -53,14 +53,15 @@ index 909926485a66e09988f7787b1d5ee2cf9c012558..17d5a5458ee51d8db243326745875ef3
// Paper start - Collision API // Paper start - Collision API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 3a26b3c40f877a454c3c76b68b86776f05950002..b7b87b2962eabcf2e8864335e4da22c0b9da8e5c 100644 index 92c33fc9680159ab4e901cfba08092d868845c63..e3ff310a83b320c26de63e9239db63de271321c2 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1280,5 +1280,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -1383,4 +1383,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param amount the amount of damage to do
*/ */
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount); void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
// Paper end - ItemStack damage API
+ +
+ // Paper start - body yaw API
+ /** + /**
+ * Gets entity body yaw + * Gets entity body yaw
+ * + *
@ -76,5 +77,5 @@ index 3a26b3c40f877a454c3c76b68b86776f05950002..b7b87b2962eabcf2e8864335e4da22c0
+ * @see Location#setYaw(float) + * @see Location#setYaw(float)
+ */ + */
+ void setBodyYaw(float bodyYaw); + void setBodyYaw(float bodyYaw);
// Paper end + // Paper end - body yaw API
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b7b87b2962eabcf2e8864335e4da22c0b9da8e5c..65dab533a33433bdd79601df4f109d9de6998fb8 100644 index 949539d4614242a8d742cd75242ce753b474edf6..de0e160632e0f0f9dee61007f139f37382f58e26 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -625,6 +625,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -657,6 +657,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull @NotNull
public Collection<PotionEffect> getActivePotionEffects(); public Collection<PotionEffect> getActivePotionEffects();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 741ead65c89d4f9521d35dcbc9661d6772058499..0cfbb77c4da58b0692cb1df5686657b5ce04ad87 100644 index d97e42de951527afb03eafc481704418dedffde9..c73eed20d18d1109e3b78b9daa92d7438fc52e8d 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -274,5 +274,7 @@ public interface UnsafeValues { @@ -276,5 +276,7 @@ public interface UnsafeValues {
* @throws IllegalStateException if no biome by the given key is registered. * @throws IllegalStateException if no biome by the given key is registered.
*/ */
void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey); void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add predicate for blocks when raytracing
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89ffc183638 100644 index fa81e440ad20ab8740cb073f515d1671dc6ea9a0..377d57b0e603898d309a9384aa8bb9fca97673e3 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -1694,6 +1694,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -1703,6 +1703,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable @Nullable
public RayTraceResult rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter); public RayTraceResult rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter);
@ -36,7 +36,7 @@ index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89f
/** /**
* Performs a ray trace that checks for block collisions using the blocks' * Performs a ray trace that checks for block collisions using the blocks'
* precise collision shapes. * precise collision shapes.
@@ -1757,6 +1778,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -1766,6 +1787,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable @Nullable
public RayTraceResult rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks); public RayTraceResult rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks);
@ -71,7 +71,7 @@ index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89f
/** /**
* Performs a ray trace that checks for both block and entity collisions. * Performs a ray trace that checks for both block and entity collisions.
* <p> * <p>
@@ -1790,6 +1839,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -1799,6 +1848,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable @Nullable
public RayTraceResult rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter); public RayTraceResult rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter);

Datei anzeigen

@ -77,14 +77,15 @@ index 18c672f3855a329bf8f87a9de81b677e8e360b41..e1fb4d8cca6a9c59047b1396f5c40bea
} }
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
index 4327cbc15b9b88d3a568edbebc69c94638ea0465..178d83cb3ccff2d12477d3c13ca4f108fa17e619 100644 index 941fac4eee338870d8c30cb1f64cab572cf54548..74816d6da4d7c8d2fa8a7b93fdc4bf29c8d12803 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
@@ -50,4 +50,13 @@ public interface TrimMaterial extends Keyed { @@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable {
* {@link Material#AMETHYST_SHARD}. @Deprecated(forRemoval = true)
*/ @org.jetbrains.annotations.NotNull String getTranslationKey();
public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst")); // Paper end - adventure
+ // Paper start +
+ // Paper start - Registry#getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_MATERIAL}. TrimMaterials + * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_MATERIAL}. TrimMaterials
+ * can exist without a key. + * can exist without a key.
@ -92,17 +93,18 @@ index 4327cbc15b9b88d3a568edbebc69c94638ea0465..178d83cb3ccff2d12477d3c13ca4f108
+ @Deprecated(forRemoval = true, since = "1.20.4") + @Deprecated(forRemoval = true, since = "1.20.4")
+ @Override + @Override
+ org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey(); + org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey();
+ // Paper end + // Paper end - Registry#getKey
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
index 2365220dc0eb1e130b65e81727ff8768dea3f881..e29fc42ae2b9c555db63d10d20552748e28ba60e 100644 index 3fa087d09c7c2d864eea25659951a537359c9589..31554cfa01360b0f92336617a75f313e0175af7a 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
@@ -74,4 +74,13 @@ public interface TrimPattern extends Keyed { @@ -92,4 +92,14 @@ public interface TrimPattern extends Keyed, Translatable {
* {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}. @Deprecated(forRemoval = true)
*/ @org.jetbrains.annotations.NotNull String getTranslationKey();
public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host")); // Paper end - adventure
+ // Paper start +
+ // Paper start - Registry#getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns + * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns
+ * can exist without a key. + * can exist without a key.
@ -110,5 +112,5 @@ index 2365220dc0eb1e130b65e81727ff8768dea3f881..e29fc42ae2b9c555db63d10d20552748
+ @Deprecated(forRemoval = true, since = "1.20.4") + @Deprecated(forRemoval = true, since = "1.20.4")
+ @Override + @Override
+ org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey(); + org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey();
+ // Paper end + // Paper end - Registry#getKey
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add HiddenPotionEffect API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 65dab533a33433bdd79601df4f109d9de6998fb8..5cb82901a5d0c8ee673501fc53389d526d4a5b6f 100644 index de0e160632e0f0f9dee61007f139f37382f58e26..f5fe2abd28a3f5fa4f2adf1d63ea68a7b890d191 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java --- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -559,6 +559,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -591,6 +591,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/** /**
* Adds the given {@link PotionEffect} to the living entity. * Adds the given {@link PotionEffect} to the living entity.
@ -18,7 +18,7 @@ index 65dab533a33433bdd79601df4f109d9de6998fb8..5cb82901a5d0c8ee673501fc53389d52
* *
* @param effect PotionEffect to be added * @param effect PotionEffect to be added
* @return whether the effect could be added * @return whether the effect could be added
@@ -583,6 +586,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @@ -615,6 +618,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/** /**
* Attempts to add all of the given {@link PotionEffect} to the living * Attempts to add all of the given {@link PotionEffect} to the living
* entity. * entity.

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add api for spawn egg texture colors
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 0cfbb77c4da58b0692cb1df5686657b5ce04ad87..43f779ff7eca7450f52ac3688744743b5c3647bf 100644 index c73eed20d18d1109e3b78b9daa92d7438fc52e8d..1ac54ae7b4bcc7932492477e88a81954f71f342f 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -277,4 +277,17 @@ public interface UnsafeValues { @@ -279,4 +279,17 @@ public interface UnsafeValues {
String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic);
// Paper end // Paper end

Datei anzeigen

@ -528,10 +528,10 @@ index 0000000000000000000000000000000000000000..304f978e40e1759bb19704cc5cec3995
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 43f779ff7eca7450f52ac3688744743b5c3647bf..f2163b5238e1667a44bf623cd52bab90d9f2d88d 100644 index 1ac54ae7b4bcc7932492477e88a81954f71f342f..14a49bfd1822c25b95000f3fbb60ba1d55ae0d38 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -290,4 +290,12 @@ public interface UnsafeValues { @@ -292,4 +292,12 @@ public interface UnsafeValues {
*/ */
@Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer); @Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer);
// Paper end - spawn egg color visibility // Paper end - spawn egg color visibility

Datei anzeigen

@ -108,10 +108,10 @@ index 0000000000000000000000000000000000000000..1d9bed6691f581529c53b577b26f1d0f
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index f2163b5238e1667a44bf623cd52bab90d9f2d88d..9a65c4f614a6c358d74491794d7b25172a00bc11 100644 index 14a49bfd1822c25b95000f3fbb60ba1d55ae0d38..b9a07b2db8a3dcdb72c33c8ceda129921b2c02f1 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -298,4 +298,6 @@ public interface UnsafeValues { @@ -300,4 +300,6 @@ public interface UnsafeValues {
@org.jetbrains.annotations.ApiStatus.Internal @org.jetbrains.annotations.ApiStatus.Internal
io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager<org.bukkit.plugin.Plugin> createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck); io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager<org.bukkit.plugin.Plugin> createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck);
// Paper end - lifecycle event API // Paper end - lifecycle event API

Datei anzeigen

@ -28,7 +28,7 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
+/.factorypath +/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875d6ff8a48 index 0000000000000000000000000000000000000000..4e0b810bd0a9991d10e13920f47f0b6d0a56f6aa
--- /dev/null --- /dev/null
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -0,0 +1,141 @@ @@ -0,0 +1,141 @@
@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") { + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") {
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api") + exclude(group = "org.apache.logging.log4j", module = "log4j-api")
+ } + }
+ implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("commons-lang:commons-lang:2.6") + implementation("commons-lang:commons-lang:2.6")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") + runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
+ runtimeOnly("com.mysql:mysql-connector-j:8.2.0") + runtimeOnly("com.mysql:mysql-connector-j:8.2.0")
@ -57,8 +57,8 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875
+ +
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+ testImplementation("org.hamcrest:hamcrest:2.2") + testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.5.0") + testImplementation("org.mockito:mockito-core:5.11.0")
+ testImplementation("org.ow2.asm:asm-tree:9.5") + testImplementation("org.ow2.asm:asm-tree:9.7")
+} +}
+ +
+val craftbukkitPackageVersion = "1_20_R3" // Paper +val craftbukkitPackageVersion = "1_20_R3" // Paper
@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875
+} +}
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
deleted file mode 100644 deleted file mode 100644
index 323892c4a4bbbb9e36a6295bb390ad82798e213c..0000000000000000000000000000000000000000 index 226b56846562846d1b89c54b67b4ccc235eaf3e9..0000000000000000000000000000000000000000
--- a/pom.xml --- a/pom.xml
+++ /dev/null +++ /dev/null
@@ -1,608 +0,0 @@ @@ -1,608 +0,0 @@
@ -242,7 +242,7 @@ index 323892c4a4bbbb9e36a6295bb390ad82798e213c..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.ow2.asm</groupId> - <groupId>org.ow2.asm</groupId>
- <artifactId>asm-commons</artifactId> - <artifactId>asm-commons</artifactId>
- <version>9.5</version> - <version>9.7</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <!-- Mojang depends --> - <!-- Mojang depends -->
@ -466,13 +466,13 @@ index 323892c4a4bbbb9e36a6295bb390ad82798e213c..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.mockito</groupId> - <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId> - <artifactId>mockito-core</artifactId>
- <version>5.5.0</version> - <version>5.11.0</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.ow2.asm</groupId> - <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId> - <artifactId>asm-tree</artifactId>
- <version>9.5</version> - <version>9.7</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- </dependencies> - </dependencies>

Datei anzeigen

@ -20,7 +20,7 @@ index 74849d7b20e3c3831a6a6c3715a6e875d6ff8a48..ff9e7b4c4354d4475559213cdaa01728
- exclude(group = "org.apache.logging.log4j", module = "log4j-api") - exclude(group = "org.apache.logging.log4j", module = "log4j-api")
- } - }
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
implementation("org.ow2.asm:asm-commons:9.5") implementation("org.ow2.asm:asm-commons:9.7")
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
@@ -36,6 +34,7 @@ tasks.jar { @@ -36,6 +34,7 @@ tasks.jar {
@ -111,7 +111,7 @@ index a2a8bce29ec5540de89095574dfdc0ca9b17bbd3..d92cd89373f8373c367ce422328b9836
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index dc1021186ad4c4db26fb498e58ddec06f8bc1cf6..96210dd54e8ff6dc0375a8d03bf14fec1b26aaeb 100644 index 2930f37c663a1824a2d38df8e4b679aa6adbd870..67d347741db1c5a9a6568ee084388a59e35b16ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -209,7 +209,7 @@ public class Main { @@ -209,7 +209,7 @@ public class Main {

Datei anzeigen

@ -10,8 +10,8 @@ index ff9e7b4c4354d4475559213cdaa01728601859fa..5304f5de52a76eee876ac8f0b2834a93
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -23,6 +23,7 @@ dependencies { @@ -23,6 +23,7 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.5.0") testImplementation("org.mockito:mockito-core:5.11.0")
testImplementation("org.ow2.asm:asm-tree:9.5") testImplementation("org.ow2.asm:asm-tree:9.7")
+ testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest + testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
} }

Datei anzeigen

@ -21,7 +21,7 @@ index beb50d67ea2c1933a115766627b2adabd2032929..b8970d0064b9b64e1c50ab373818c386
@@ -11,6 +11,7 @@ dependencies { @@ -11,6 +11,7 @@ dependencies {
implementation("jline:jline:2.12.1") implementation("jline:jline:2.12.1")
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
implementation("org.ow2.asm:asm-commons:9.5") implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files + implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
@ -4847,7 +4847,7 @@ index 602964d92ddf9e4ec47ed3cb45787fdd061a881e..66550ce5cc83534af8dcac338db5cd4c
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath()); LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index dafeae664880f6da2f1aa0d9b4fbd743ed9b5572..15bdddae68db770690ddfcb19c7ecdbedbfa8cb7 100644 index 42da710d18063aed6fd450fe31277d7daf0542c1..62e096c9cc05c387ca2413a490f44c6c66a5c41e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -4945,7 +4945,7 @@ index 50b79de15571ef30f202bae5952a9f825902e11a..aac9513ff4d3d494860bd06607cf8af5
this.convertable = convertable_conversionsession; this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8487fa452e4009c0f2a23a0d4eac4bf56f91447b..00ddf94c5bade8c0c486337ce920f59d63cb64e2 100644 index f7e8cabd6ef7d31b785b69db1d5b24d55563dbe4..bd9ea2bd012cdcf07ac322b3e0360c6c336ab1f9 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -158,6 +158,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -158,6 +158,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -6074,7 +6074,7 @@ index 44cac39893eb968aa8ea21ee571c0dcb866ce06c..5151d68ba6ec72a7124f298253c5f0af
+ +
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 650bf3483414751fbda7bff584af55df49cef22d..0c77b4b201f6586b4d143ce2c3e710bf9d276a20 100644 index 9c23ad38f935b2f31c0e0998e685978434202900..4035faedd9f5f72f262822a9f050178d99be06e4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -7054,7 +7054,7 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
@Override @Override
public void tell(R runnable) { public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 02a90d4719b53f8538ed79c1f1a5c6d8833e495c..01c2ccb29dd74655ef65cc29ff2cafe6b467e5a5 100644 index cdefbfb7a578d5f90b24f24dbc9a0fe627b91474..17e489c4650ba421a993c863426f1a2084d44fb0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -331,6 +331,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -331,6 +331,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -7070,7 +7070,7 @@ index 02a90d4719b53f8538ed79c1f1a5c6d8833e495c..01c2ccb29dd74655ef65cc29ff2cafe6
public Entity(EntityType<?> type, Level world) { public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.id = Entity.ENTITY_COUNTER.incrementAndGet();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a038920172102f5ad4ceb77abef4f7b61fca5862..ea73e8a04ee767625d06483dce83d68262887a27 100644 index cb0d7779a2eeadca49a99ab31217b27f5fd49e4c..864da662a81b653cd94e2270be262e912e351e21 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -7249,7 +7249,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.defaultBlockState(); return Blocks.AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 00ddf94c5bade8c0c486337ce920f59d63cb64e2..d89431b476b032f3ff86097bb91b86016d4e3371 100644 index bd9ea2bd012cdcf07ac322b3e0360c6c336ab1f9..bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -7340,7 +7340,7 @@ index 00ddf94c5bade8c0c486337ce920f59d63cb64e2..d89431b476b032f3ff86097bb91b8601
return this.setBlock(pos, state, flags, 512); return this.setBlock(pos, state, flags, 512);
} }
@@ -555,7 +597,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -556,7 +598,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (this.isOutsideBuildHeight(pos)) { if (this.isOutsideBuildHeight(pos)) {
return Blocks.VOID_AIR.defaultBlockState(); return Blocks.VOID_AIR.defaultBlockState();
} else { } else {
@ -7773,10 +7773,10 @@ index 2cc1871c81056acd0582184bb684e672d14d3b6f..5cf26c39b00ea1f7b1c5719f434af79f
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3be60a7646 100644 index 0630680d1ff7ffd2e9c323a800213b1137817642..f012ba9c55241afb159136e8b55e774047efa2c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -251,8 +251,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public Chunk[] getLoadedChunks() { public Chunk[] getLoadedChunks() {
@ -7787,7 +7787,7 @@ index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3b
} }
@Override @Override
@@ -327,7 +327,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -328,7 +328,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean refreshChunk(int x, int z) { public boolean refreshChunk(int x, int z) {
@ -7796,7 +7796,7 @@ index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3b
if (playerChunk == null) return false; if (playerChunk == null) return false;
playerChunk.getTickingChunkFuture().thenAccept(either -> { playerChunk.getTickingChunkFuture().thenAccept(either -> {
@@ -2055,4 +2055,55 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2075,4 +2075,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.spigot; return this.spigot;
} }
// Spigot end // Spigot end
@ -8177,7 +8177,7 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index a2eb1e6dc8218157c1a5bbd769dd3b1d881fddb6..56c3aa7647eb2890cf7f546d35002b0c43724500 100644 index 09b3bfa3ad0cf060b126cffd1de1032bc329cb44..30f0c671464e2d4557845f150d8d18bfcd645e14 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -107,8 +107,17 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -107,8 +107,17 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -2667,7 +2667,7 @@ index a5578cbce2d1d39ba3315e53425d5323e6823a65..7a036c08fa67504d06c8f72a32c22814
@Override @Override
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0c77b4b201f6586b4d143ce2c3e710bf9d276a20..3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8 100644 index 4035faedd9f5f72f262822a9f050178d99be06e4..4c18491a627e66297627abbded1af48b2026e610 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -191,6 +191,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot @@ -191,6 +191,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
@ -2727,7 +2727,7 @@ index 0c77b4b201f6586b4d143ce2c3e710bf9d276a20..3691fd58c7baf98b15c50fa4dacf3a35
this.motd = motd; this.motd = motd;
} }
@@ -2439,23 +2450,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2434,23 +2445,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) { public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) {
@ -3577,10 +3577,10 @@ index 5cf26c39b00ea1f7b1c5719f434af79fb20c6c60..8441cbe4ebd676d1aacff223abdabeb3
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474b4e903d3 100644 index f012ba9c55241afb159136e8b55e774047efa2c8..95b3bcd4cfcedc358096831bc59a7effd186a063 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -161,6 +161,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this); private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
@ -3588,7 +3588,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474
private static final Random rand = new Random(); private static final Random rand = new Random();
@@ -1659,6 +1660,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1679,6 +1680,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
entityTracker.broadcastAndSend(packet); entityTracker.broadcastAndSend(packet);
} }
} }
@ -3631,7 +3631,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474
private static Map<String, GameRules.Key<?>> gamerules; private static Map<String, GameRules.Key<?>> gamerules;
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() { public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
@@ -2105,5 +2142,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2125,5 +2162,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public void setSendViewDistance(final int viewDistance) { public void setSendViewDistance(final int viewDistance) {
throw new UnsupportedOperationException("Not implemented yet"); throw new UnsupportedOperationException("Not implemented yet");
} }
@ -3651,7 +3651,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 02060584892d630d91f58e864ed34656ee738572..5158d536de16c93358d1b335b0fcfbe0d6ce848e 100644 index 6f9196120177104c6e689ff1d39a06f91d04b0c8..c513d932e0c455401bbe53d13779df0e4bda16ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -20,6 +20,12 @@ public class Main { @@ -20,6 +20,12 @@ public class Main {
@ -4039,7 +4039,7 @@ index 1e82312c24cb752d63b165926861fc178cd7849b..7f22950ae61436e91a59cd29a345809c
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
index 24052b8102061c6fbf01b3e9b2346ed9783787e6..f0f7fb977edb7e7009716429f007e44fa36bfcda 100644 index 9c1063d92a49c71f4458bf1634bcf9d79302ecca..f24b4732db849893fd870b4b6a49f1c4b3eacdec 100644
--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
@@ -147,6 +147,12 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine @@ -147,6 +147,12 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
@ -4054,7 +4054,7 @@ index 24052b8102061c6fbf01b3e9b2346ed9783787e6..f0f7fb977edb7e7009716429f007e44f
+ // Paper end + // Paper end
@Override @Override
public boolean equals(Object other) { public String getTranslationKey() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7126d8cdeea5eb23176af6a97a99b33961749d71..e78a378f0de48cde3702774970e6cda241b8ddda 100644 index 7126d8cdeea5eb23176af6a97a99b33961749d71..e78a378f0de48cde3702774970e6cda241b8ddda 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@ -4119,10 +4119,10 @@ index 7126d8cdeea5eb23176af6a97a99b33961749d71..e78a378f0de48cde3702774970e6cda2
@Override @Override
public boolean isPermissionSet(String name) { public boolean isPermissionSet(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 4a70c2dfb3606bb67b80e99cae316906385f7ff3..52222f15399f2e1828f93b0f69e34157e3abff23 100644 index 2411293eb87587ea0eac95d0ab976cba04fa5026..4d92ca5b580e66e78b592bc0de1078dc10a85f39 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -320,9 +320,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -323,9 +323,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
container = CraftEventFactory.callInventoryOpenEvent(player, container); container = CraftEventFactory.callInventoryOpenEvent(player, container);
if (container == null) return; if (container == null) return;
@ -4137,7 +4137,7 @@ index 4a70c2dfb3606bb67b80e99cae316906385f7ff3..52222f15399f2e1828f93b0f69e34157
player.containerMenu = container; player.containerMenu = container;
player.initMenu(container); player.initMenu(container);
} }
@@ -391,8 +394,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -394,8 +397,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
// Now open the window // Now open the window
MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
@ -4704,10 +4704,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
@Override @Override
public int getLineWidth() { public int getLineWidth() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff0523c2cccd6 100644 index 8290925413aab682504e98bde5fd6845929b3541..5ee9726324591055bb5d00cf9646203fbe7cc833 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -905,7 +905,7 @@ public class CraftEventFactory { @@ -906,7 +906,7 @@ public class CraftEventFactory {
return event; return event;
} }
@ -4716,7 +4716,7 @@ index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff052
CraftPlayer entity = victim.getBukkitEntity(); CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory); event.setKeepInventory(keepInventory);
@@ -932,7 +932,7 @@ public class CraftEventFactory { @@ -933,7 +933,7 @@ public class CraftEventFactory {
* Server methods * Server methods
*/ */
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) { public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
@ -5167,6 +5167,44 @@ index 39eb09106c1e3d00eb32b56babae751f487d6bcb..893da5266fc09e583a660bc23ac84008
@Override @Override
public boolean hasRepairCost() { public boolean hasRepairCost() {
return this.repairCost > 0; return this.repairCost > 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
index 49752459ad67db3182c6d6d30ab91f2a420847a8..147950b8a1c853e1b52fdb29b26e839c2dd7bd01 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
@@ -41,6 +41,14 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
@NotNull
@Override
public String getTranslationKey() {
+ if (!(this.handle.description().getContents() instanceof TranslatableContents)) throw new UnsupportedOperationException("Description isn't translatable!"); // Paper
return ((TranslatableContents) this.handle.description().getContents()).getKey();
}
+
+ // Paper start - adventure
+ @Override
+ public net.kyori.adventure.text.Component description() {
+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.handle.description());
+ }
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
index cd5f68a6fb8290c238ba466a34d955eb90667459..88e9acd2084c5e7738017a91a454fc5407ab833b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
@@ -41,6 +41,14 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
@NotNull
@Override
public String getTranslationKey() {
+ if (!(this.handle.description().getContents() instanceof TranslatableContents)) throw new UnsupportedOperationException("Description isn't translatable!"); // Paper
return ((TranslatableContents) this.handle.description().getContents()).getKey();
}
+
+ // Paper start - adventure
+ @Override
+ public net.kyori.adventure.text.Component description() {
+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.handle.description());
+ }
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java
index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2faa0d476 100644 index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2faa0d476 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java
@ -5493,7 +5531,7 @@ index d4fc39c4c450e675c5696b376576a4449a475497..516b3fef4d388366df09f0dd88deadbc
boolean hadFormat = false; boolean hadFormat = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 56c3aa7647eb2890cf7f546d35002b0c43724500..5cbac19f3c5eaa1940b36891b5a289c425300b20 100644 index 30f0c671464e2d4557845f150d8d18bfcd645e14..203225cc5d0edc0de7e3dcf7ee4af15004cc1187 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -78,6 +78,43 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -78,6 +78,43 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -7253,7 +7253,7 @@ index 909b2c98e7a9117d2f737245e4661792ffafb744..d96399e9bf1a58db5a4a22e58abb99e7
@Override @Override
public FileConfiguration getConfig() { public FileConfiguration getConfig() {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 5cbac19f3c5eaa1940b36891b5a289c425300b20..8db0df55c5e23657b3a99a56fefb8e7419618c16 100644 index 203225cc5d0edc0de7e3dcf7ee4af15004cc1187..ea994c34e1ca725eae4d05223fc09fc1308b0730 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -426,6 +426,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -426,6 +426,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -7268,7 +7268,7 @@ index 5cbac19f3c5eaa1940b36891b5a289c425300b20..8db0df55c5e23657b3a99a56fefb8e74
+ // Paper end + // Paper end
@Override @Override
public FeatureFlag getFeatureFlag(NamespacedKey namespacedKey) { public String getTranslationKey(final Attribute attribute) {
diff --git a/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier b/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier diff --git a/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier b/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..20dbe2775951bfcdb85c5d679ac86c77a93e0847 index 0000000000000000000000000000000000000000..20dbe2775951bfcdb85c5d679ac86c77a93e0847

Datei anzeigen

@ -700,12 +700,12 @@ index 0000000000000000000000000000000000000000..2f0d9b953802dee821cfde82d22b0567
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213508ece81 100644 index c8134e605e2dd58c2af1cbefc5e20e91b6414d2a..b7ffab0284b0bccd79775b8d03c8b2e088f91d1d 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -29,7 +29,8 @@ public class PacketUtils { @@ -29,7 +29,8 @@ public class PacketUtils {
engine.executeIfPossible(() -> { engine.executeIfPossible(() -> {
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
if (listener.shouldHandleMessage(packet)) { if (listener.shouldHandleMessage(packet)) {
- try { - try {
+ co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings + co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
@ -714,7 +714,7 @@ index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213
} catch (Exception exception) { } catch (Exception exception) {
label25: label25:
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8..a6a8b5079ceaad90a79a09cab5c38a6fde6d33ee 100644 index 4c18491a627e66297627abbded1af48b2026e610..3365d2ec8426888c16873a311226fa69840fa2f0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main; @@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main;
@ -1315,7 +1315,7 @@ index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f
public UserWhiteList getWhiteList() { public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 01c2ccb29dd74655ef65cc29ff2cafe6b467e5a5..cdb4acbaf019608c57d7a40c6928ddc9c00fd1d5 100644 index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f000384d930c3a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1393,7 +1393,7 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ea73e8a04ee767625d06483dce83d68262887a27..5ae9f9a4cb903909cb26a612a847d12515c52d91 100644 index 864da662a81b653cd94e2270be262e912e351e21..da755e478d2ab1444c92afd0d916589b2e6f4df4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -142,7 +142,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -142,7 +142,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1474,7 +1474,7 @@ index ea73e8a04ee767625d06483dce83d68262887a27..5ae9f9a4cb903909cb26a612a847d125
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) { if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(this.damageSources().drown(), 1.0F); this.hurt(this.damageSources().drown(), 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d89431b476b032f3ff86097bb91b86016d4e3371..aa22d4024cdd0ecb1c0442ecdeae00822597362e 100644 index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00b0fbc07a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -91,7 +91,6 @@ import org.bukkit.Bukkit; @@ -91,7 +91,6 @@ import org.bukkit.Bukkit;
@ -1503,7 +1503,7 @@ index d89431b476b032f3ff86097bb91b86016d4e3371..aa22d4024cdd0ecb1c0442ecdeae0082
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime); this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
} }
@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -726,15 +725,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.timings.tileEntityTick.stopTiming(); // Spigot this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false; this.tickingBlockEntities = false;
@ -2019,7 +2019,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
+ } // Paper + } // Paper
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 8db0df55c5e23657b3a99a56fefb8e7419618c16..5e541636b216d4f46be18b1031522bd92e667b67 100644 index ea994c34e1ca725eae4d05223fc09fc1308b0730..d72e6ebc8b7b002279ba61c30b5a42f8cd5b3b7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -214,6 +214,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -214,6 +214,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -2035,7 +2035,7 @@ index 8db0df55c5e23657b3a99a56fefb8e7419618c16..5e541636b216d4f46be18b1031522bd9
public static byte toLegacyData(BlockState data) { public static byte toLegacyData(BlockState data) {
return CraftLegacy.toLegacyData(data); return CraftLegacy.toLegacyData(data);
@@ -457,6 +463,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -462,6 +468,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) { public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
return new CraftDamageSourceBuilder(damageType); return new CraftDamageSourceBuilder(damageType);
} }

Datei anzeigen

@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..22a55be34fde453fedd987173d95b8b3
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 5e541636b216d4f46be18b1031522bd92e667b67..d11773ed44936f8836f2f8e582d5e9573af5b439 100644 index d72e6ebc8b7b002279ba61c30b5a42f8cd5b3b7b..82d862432d061f8f1809647d9eecfff38a6311d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -468,6 +468,11 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -473,6 +473,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() { public String getTimingsServerName() {
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName; return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9cfc60863caeaa1fd0df153889cadd88fef9e111..3442bfe428f6d0655082468f281cbda97f88f6ea 100644 index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e9a160d59 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -734,11 +734,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try { try {
tickConsumer.accept(entity); tickConsumer.accept(entity);
} catch (Throwable throwable) { } catch (Throwable throwable) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 7ead83d46e7bb3ee3586acf695b08f197f61f04a..6fbadd278138743f87fcf6b3c3d3c57af41d437c 100644 index 673141ab586057b2d05b3921cc4d42b4f5e049ab..3f910b1712c41e91de99ad00a90e0f3081f94deb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -707,9 +707,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -708,9 +708,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally(); boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0; int tilesThisCycle = 0;

Datei anzeigen

@ -81,10 +81,10 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c74102a53daab92f0d7d4d7619af0e3264322847..3452010631eede3907b29b9f76ba12c9c6808b6f 100644 index 3f910b1712c41e91de99ad00a90e0f3081f94deb..b91df88036d3ec2579883a9c65a7b80d4c0be81b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -736,6 +736,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -737,6 +737,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent block entity and entity crashes // Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable); MinecraftServer.LOGGER.error(msg, throwable);

Datei anzeigen

@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
deprecated deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a73a5a8291ddd954f2c7b73a4895933e715c5d68..4636e1ebf11025a551d398a6594b1506748a8390 100644 index 844a97b0eb396835ec72b4d14c9362a2ea2a8709..75dccbdde0d116ef194aa2ced328ad3c3992204e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -267,10 +267,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
@Override @Override
@ -41,7 +41,7 @@ index a73a5a8291ddd954f2c7b73a4895933e715c5d68..4636e1ebf11025a551d398a6594b1506
@Override @Override
public void damage(double amount) { public void damage(double amount) {
@@ -799,4 +818,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -815,4 +834,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible; this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible); this.getHandle().setSharedFlag(5, invisible);
} }

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cc2775d94f3b6ebd7f97e14e324bf292d5874de4..a4df17bf15ac8e427039428f947df4f08c746de6 100644 index 001592ec2ec34a744713d4d6c95a00955889facd..72ddebd40c2b29e0c6e069d62ed206c29ad5fa6b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1457,6 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1457,6 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -18,7 +18,7 @@ index cc2775d94f3b6ebd7f97e14e324bf292d5874de4..a4df17bf15ac8e427039428f947df4f0
this.profiler.push(() -> { this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location(); return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index a127acc6c44bfd078e06c74b408d62df6e85d1fe..5975cc2fa72609ea5f3e6f99155d6e5bc321a321 100644 index ea4eacf66651798185e1c445979a465e173571d0..1c3b12692094c1eaa086ebb2f060b22aaf9d9b39 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -30,10 +30,10 @@ index a127acc6c44bfd078e06c74b408d62df6e85d1fe..5975cc2fa72609ea5f3e6f99155d6e5b
public LevelChunk getChunkIfLoaded(int x, int z) { public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false); return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c3138a2ff6446fb72d9eb1bd31f851d7df6b94f2..61056b2873a58bf8d0f70e39022ded4b1fcbc5a5 100644 index 2ad3c16bf36972ff55269612f02cdb4f558f35b7..424377f062c6443460a9814feb8b90e7bef71c6a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -496,7 +496,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -497,7 +497,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start // CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld(); CraftWorld world = ((ServerLevel) this).getWorld();

Datei anzeigen

@ -59,10 +59,10 @@ index 37cba1e693490e42908f45dc68e60ac3afebbb49..801e1727bd291f647c91e2c325810ead
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 6571adf5285ab3f84513c2f5b32ff0523c2cccd6..c8f20543cb7f69af010e3fd53f31b7253426f2d0 100644 index 5ee9726324591055bb5d00cf9646203fbe7cc833..8de2f4ca83017d37c63d33c6283078a71143f077 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1850,4 +1850,13 @@ public class CraftEventFactory { @@ -1856,4 +1856,13 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause)); Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
} }

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 866ff31a6057eda7612cfa48c0028fb988deed64..2c500fed04982c502b3e6fb1687b38bfaaa37f69 100644 index 677ce578af9da4b512bad47fe54625305e99c7e4..20ee0fd8f5a808436fae60b64fc3e8966146ba71 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@ -25,7 +25,7 @@ index 866ff31a6057eda7612cfa48c0028fb988deed64..2c500fed04982c502b3e6fb1687b38bf
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler(); this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> { this.onMetricsRecordingStopped = (methodprofilerresults) -> {
@@ -2430,9 +2432,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2425,9 +2427,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return false; return false;
} }

Datei anzeigen

@ -81,10 +81,10 @@ index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1977e702f6af39ebf100c1f2f2edc2d1
double deltaLength = Math.sqrt(distanceSquared); double deltaLength = Math.sqrt(distanceSquared);
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance; double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index ebdb6e838ecd378edc81b92cc3a8a1955d2498c1..29b17f408e1ad304996ce116737ee4fbc248da4c 100644 index 0137f61a572800ea7bb013185835a1ad4cd0462c..1ecde4f1dff5bfa67c526a699061f1952da59fae 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1268,4 +1268,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1269,4 +1269,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private ExplosionInteraction() {} private ExplosionInteraction() {}
} }

Datei anzeigen

@ -28,10 +28,10 @@ index e1311841cdf79fa2769cfa6817985007ace2e4d8..e7db715d45d27cbc9b3ed7cad1d90727
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null); entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
entitywitch.setNoAi(this.isNoAi()); entitywitch.setNoAi(this.isNoAi());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c8f20543cb7f69af010e3fd53f31b7253426f2d0..c47eac1e442162192a35e841a06c4d028d71cd15 100644 index 8de2f4ca83017d37c63d33c6283078a71143f077..5e566d08346084880d88b406c6ce80328e26a180 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1197,6 +1197,14 @@ public class CraftEventFactory { @@ -1198,6 +1198,14 @@ public class CraftEventFactory {
return !event.isCancelled(); return !event.isCancelled();
} }

Datei anzeigen

@ -18,10 +18,10 @@ index dfa16aa79e94d85a49c9c28229b29a972ec6e216..7ce46bd254e0f14b1bbafe37e0eb97a4
--this.count; --this.count;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c47eac1e442162192a35e841a06c4d028d71cd15..b2b07587c50e6c6f55a8cd36405833f4a4f9674c 100644 index 5e566d08346084880d88b406c6ce80328e26a180..81927bb6579b9a2119e377026d4e778daddb7f12 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1150,6 +1150,17 @@ public class CraftEventFactory { @@ -1151,6 +1151,17 @@ public class CraftEventFactory {
return event; return event;
} }

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
Deprecated now and replaced with ProjectileHitEvent Deprecated now and replaced with ProjectileHitEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index b2b07587c50e6c6f55a8cd36405833f4a4f9674c..c1f3086d37e2959bbcc23bc1b779215bc35c99c4 100644 index 81927bb6579b9a2119e377026d4e778daddb7f12..2bcac771a37b3e5d3b7173e24dad7823fb29757c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1294,6 +1294,17 @@ public class CraftEventFactory { @@ -1295,6 +1295,17 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem); return CraftItemStack.asNMSCopy(bitem);
} }
@ -27,7 +27,7 @@ index b2b07587c50e6c6f55a8cd36405833f4a4f9674c..c1f3086d37e2959bbcc23bc1b779215b
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) { public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
@@ -1318,8 +1329,15 @@ public class CraftEventFactory { @@ -1319,8 +1330,15 @@ public class CraftEventFactory {
if (position.getType() == HitResult.Type.ENTITY) { if (position.getType() == HitResult.Type.ENTITY) {
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
} }

Datei anzeigen

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e4a2afc20efcfd7a6107dc56217ae8451dd5a7d6..0045016cd22c34168c4ae5f2fe951d536394be9a 100644 index 926e4f9760e07ab66405132de2e96306211e5b9c..7800276dea6176ed489809d589b850252fc9333b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -114,7 +114,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -114,7 +114,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -20,10 +20,10 @@ index e4a2afc20efcfd7a6107dc56217ae8451dd5a7d6..0045016cd22c34168c4ae5f2fe951d53
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList(); private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities; private boolean tickingBlockEntities;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8ff8d8174cd32d25b33c2e773d30c474b4e903d3..07aac886235e18a29420c494380e6b26bfa8f36e 100644 index 95b3bcd4cfcedc358096831bc59a7effd186a063..aac9eee069b16ab70b7553c6c324149011c94f8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -163,6 +163,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers

Datei anzeigen

@ -58,7 +58,7 @@ index 1219b12750edb855df0962d14d7f3c1859d78b2e..511dfff4870c197b6f69169cc0504ef0
+ alsoShade(log4jPlugins.output) + alsoShade(log4jPlugins.output)
+ // Paper end + // Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
implementation("org.ow2.asm:asm-commons:9.5") implementation("org.ow2.asm:asm-commons:9.7")
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
@@ -75,7 +96,7 @@ relocation { @@ -75,7 +96,7 @@ relocation {
} }
@ -250,7 +250,7 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd
} }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1d8e17f4b862e71cc5ef8c5eabfb80dc427aec51..6587cd9ea257d0f6f1308ea8ca4d0245178b2870 100644 index 48513e585ce02c301983adbe1224e95ff7f9a345..22b9d4bebee30877225b08b46cec6084b12a9c5a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -155,7 +155,7 @@ import org.slf4j.Logger; @@ -155,7 +155,7 @@ import org.slf4j.Logger;

Datei anzeigen

@ -59,10 +59,10 @@ index 7429df8c6f29f7216e33cde3226424936de97cf9..4bbf8bb418e3585be2efce5d9a8785fa
@Override @Override
public abstract boolean isSpectator(); public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 52222f15399f2e1828f93b0f69e34157e3abff23..e6b16e3db7a197c7af0c4fdb782749c3c3f37538 100644 index 4d92ca5b580e66e78b592bc0de1078dc10a85f39..2cb3c0b96b769c395f7fecbeebba0ff2a33b692d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -516,6 +516,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -513,6 +513,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
this.getHandle().getCooldowns().addCooldown(CraftItemType.bukkitToMinecraft(material), ticks); this.getHandle().getCooldowns().addCooldown(CraftItemType.bukkitToMinecraft(material), ticks);
} }

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4636e1ebf11025a551d398a6594b1506748a8390..82773a05783b731e2f7bd00c8ec68090d15a7b66 100644 index 75dccbdde0d116ef194aa2ced328ad3c3992204e..19f8cfe1146374169208f26632763a882291431c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -390,6 +390,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity(); return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0045016cd22c34168c4ae5f2fe951d536394be9a..c8914696785d0d6c451d598616a83c316f611aad 100644 index 7800276dea6176ed489809d589b850252fc9333b..79588b6535eb6e0d21bedc1fc5e939903b450e2f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -729,6 +729,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -730,6 +730,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally(); boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0; int tilesThisCycle = 0;
@ -17,7 +17,7 @@ index 0045016cd22c34168c4ae5f2fe951d536394be9a..c8914696785d0d6c451d598616a83c31
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition); TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -737,12 +739,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -738,12 +740,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) { if (tickingblockentity.isRemoved()) {
// Spigot start // Spigot start
tilesThisCycle--; tilesThisCycle--;

Datei anzeigen

@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled. information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e02c508b2f 100644 index 79588b6535eb6e0d21bedc1fc5e939903b450e2f..232281b12fb1970fae82ce8fd3ffe1586d02bfb3 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -39,7 +39,7 @@ index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e0
if (blockstate == null) { if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate); this.capturedBlockStates.put(pos.immutable(), blockstate);
@@ -410,7 +410,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -411,7 +411,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start - capture blockstates // CraftBukkit start - capture blockstates
boolean captured = false; boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) { if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
@ -49,7 +49,7 @@ index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e0
this.capturedBlockStates.put(pos.immutable(), blockstate); this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true; captured = true;
} }
@@ -611,7 +612,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -612,7 +613,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
if (this.captureTreeGeneration) { if (this.captureTreeGeneration) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index e6b16e3db7a197c7af0c4fdb782749c3c3f37538..092d2bfab7e8fd9840e853f09adc85311ab29046 100644 index 2cb3c0b96b769c395f7fecbeebba0ff2a33b692d..5d69945e6428c04a4b89c7469de905ed05d9dfc0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -626,6 +626,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -623,6 +623,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
} }
} }

Datei anzeigen

@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use. This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6cadfd678f1b2323a763ffd9220de7394620328b..180a9ade7bbc84d8c64b6c92583ba870464c23a5 100644 index d2266bc75f2c1b0b02405eea0711a7b53d1a9e7a..256b9c6cbf52c252f8174d0aa74e1270fb092ae9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1503,12 +1503,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1503,12 +1503,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -34,10 +34,10 @@ index 6cadfd678f1b2323a763ffd9220de7394620328b..180a9ade7bbc84d8c64b6c92583ba870
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 07aac886235e18a29420c494380e6b26bfa8f36e..012c0bf4f824543d475e97e0edb6c4fe88d046e5 100644 index aac9eee069b16ab70b7553c6c324149011c94f8e..1480fbf52f9eb11892886b99a76a971cabb72c92 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1932,13 +1932,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1952,13 +1952,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

Datei anzeigen

@ -22,10 +22,10 @@ index 96a87db9f8976d3f1ff09beb9598db31fff72d5b..25a1edf64602a13c07779e58b167a847
this.setUsingItem(true); this.setUsingItem(true);
if (!this.isSilent()) { if (!this.isSilent()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c1f3086d37e2959bbcc23bc1b779215bc35c99c4..096e80bb71d10c897a20bb3c0b4b761328c9f56e 100644 index 2bcac771a37b3e5d3b7173e24dad7823fb29757c..203b6539c55b74484cff476b6472f44ed56112c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1896,4 +1896,14 @@ public class CraftEventFactory { @@ -1902,4 +1902,14 @@ public class CraftEventFactory {
).callEvent(); ).callEvent();
} }
// Paper end - PlayerUseUnknownEntityEvent // Paper end - PlayerUseUnknownEntityEvent

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index bbf3286cb69f931be528726e45784eec9f8e0af3..21bef887193c777ec1e311b3bf5c0213180ea4ca 100644 index 4af3e59b9ad84aaf1a5dd8f1373b781233ba07d6..7810739098ee52efafbbd5355d4d16dadcb5ac35 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3828,12 +3828,24 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3828,12 +3828,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -35,10 +35,10 @@ index bbf3286cb69f931be528726e45784eec9f8e0af3..21bef887193c777ec1e311b3bf5c0213
return this.isShiftKeyDown(); return this.isShiftKeyDown();
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a2b2c3da97979b1684ec48934f82a784f1e63b6b..ccd2880da35263d1d16597eba2ec35b8b343cb5d 100644 index 19f8cfe1146374169208f26632763a882291431c..1c6abeff5b541cdea914ac956f2ab1d2e1c5769f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -839,5 +839,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -855,5 +855,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(final int arrows) { public void setArrowsStuck(final int arrows) {
this.getHandle().setArrowCount(arrows); this.getHandle().setArrowCount(arrows);
} }

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 012c0bf4f824543d475e97e0edb6c4fe88d046e5..b5bf92b668be5bdbd6af722929aee28eb1bf5ffa 100644 index 1480fbf52f9eb11892886b99a76a971cabb72c92..afdba543388f5f2e194add0e988f8515db24f76e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -735,6 +735,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -755,6 +755,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled; return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled;
} }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen