From 38376f43a0c268e5223746cab13910f55e5ecf41 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:20:51 +0200 Subject: [PATCH] Some jd fixes (#9781) --- patches/api/0003-Test-changes.patch | 43 +++---------------- patches/api/0005-Adventure.patch | 11 ++--- patches/api/0153-Add-Material-Tags.patch | 6 +-- .../0172-Fix-Spigot-annotation-mistakes.patch | 13 ++++++ .../0177-Add-BlockSoundGroup-interface.patch | 2 +- ...181-Improve-Block-breakNaturally-API.patch | 2 +- ...-Add-methods-to-get-translation-keys.patch | 2 +- patches/api/0223-Add-Destroy-Speed-API.patch | 2 +- ...0233-Additional-Block-Material-API-s.patch | 2 +- patches/api/0263-Add-Block-isValidTool.patch | 2 +- ...Collidable-methods-to-various-places.patch | 2 +- .../api/0354-Add-getComputedBiome-API.patch | 2 +- patches/api/0373-Block-Ticking-API.patch | 2 +- .../api/0379-Add-getDrops-to-BlockState.patch | 4 +- ...0419-Add-Sign-getInteractableSideFor.patch | 4 +- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 2 +- ...ing-Trader-spawn-rate-config-options.patch | 2 +- 17 files changed, 44 insertions(+), 59 deletions(-) diff --git a/patches/api/0003-Test-changes.patch b/patches/api/0003-Test-changes.patch index 3bef4c7cdf..5bd26772c4 100644 --- a/patches/api/0003-Test-changes.patch +++ b/patches/api/0003-Test-changes.patch @@ -221,46 +221,17 @@ index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242 return false; } diff --git a/src/test/java/org/bukkit/BukkitMirrorTest.java b/src/test/java/org/bukkit/BukkitMirrorTest.java -index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..0970bcdf094a2026168b574848e4f7045e80db74 100644 +index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b925a42c3b 100644 --- a/src/test/java/org/bukkit/BukkitMirrorTest.java +++ b/src/test/java/org/bukkit/BukkitMirrorTest.java -@@ -28,18 +28,21 @@ public class BukkitMirrorTest { +@@ -9,6 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest; + import org.junit.jupiter.params.provider.Arguments; + import org.junit.jupiter.params.provider.MethodSource; - @ParameterizedTest - @MethodSource("data") -+ @org.junit.jupiter.api.Disabled // Paper - public void isStatic(Method server, String name, Method bukkit) throws Throwable { - assertThat(Modifier.isStatic(bukkit.getModifiers()), is(true)); - } ++@org.junit.jupiter.api.Disabled // Paper + public class BukkitMirrorTest { - @ParameterizedTest - @MethodSource("data") -+ @org.junit.jupiter.api.Disabled // Paper - public void isDeprecated(Method server, String name, Method bukkit) throws Throwable { - assertThat(bukkit.isAnnotationPresent(Deprecated.class), is(server.isAnnotationPresent(Deprecated.class))); - } - - @ParameterizedTest - @MethodSource("data") -+ @org.junit.jupiter.api.Disabled // Paper - public void returnType(Method server, String name, Method bukkit) throws Throwable { - assertThat(bukkit.getReturnType(), is((Object) server.getReturnType())); - // assertThat(bukkit.getGenericReturnType(), is(server.getGenericReturnType())); // too strict on type generics -@@ -47,12 +50,14 @@ public class BukkitMirrorTest { - - @ParameterizedTest - @MethodSource("data") -+ @org.junit.jupiter.api.Disabled // Paper - public void parameterTypes(Method server, String name, Method bukkit) throws Throwable { - // assertThat(bukkit.getGenericParameterTypes(), is(server.getGenericParameterTypes())); // too strict on type generics - } - - @ParameterizedTest - @MethodSource("data") -+ @org.junit.jupiter.api.Disabled // Paper - public void declaredException(Method server, String name, Method bukkit) throws Throwable { - assertThat(bukkit.getGenericExceptionTypes(), is(server.getGenericExceptionTypes())); - } + public static Stream data() { diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644 --- a/src/test/java/org/bukkit/support/TestServer.java diff --git a/patches/api/0005-Adventure.patch b/patches/api/0005-Adventure.patch index 6e11557e8b..15499955e0 100644 --- a/patches/api/0005-Adventure.patch +++ b/patches/api/0005-Adventure.patch @@ -1579,10 +1579,10 @@ index 372c0bd5a4d7800a11c24c95e39fe376a96232bf..9c88be68b4f403d0500cb607394b3a16 + // Paper end } diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java -index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..e6b87ad5b2099800a61e7f585a5404e9e672228a 100644 +index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a18456879 100644 --- a/src/main/java/org/bukkit/block/Sign.java +++ b/src/main/java/org/bukkit/block/Sign.java -@@ -10,12 +10,50 @@ import org.jetbrains.annotations.NotNull; +@@ -10,12 +10,51 @@ import org.jetbrains.annotations.NotNull; * Represents a captured state of either a SignPost or a WallSign. */ public interface Sign extends TileState, Colorable { @@ -1591,9 +1591,10 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..e6b87ad5b2099800a61e7f585a5404e9 + * Gets all the lines of text currently on the {@link Side#FRONT} of this sign. + * + * @return List of components containing each line of text -+ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}. ++ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}. + */ + @NotNull ++ @Deprecated + public java.util.List lines(); + + /** @@ -1634,7 +1635,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..e6b87ad5b2099800a61e7f585a5404e9 */ @Deprecated @NotNull -@@ -29,7 +67,7 @@ public interface Sign extends TileState, Colorable { +@@ -29,7 +68,7 @@ public interface Sign extends TileState, Colorable { * @param index Line number to get the text from, starting at 0 * @return Text on the given line * @throws IndexOutOfBoundsException Thrown when the line does not exist @@ -1643,7 +1644,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..e6b87ad5b2099800a61e7f585a5404e9 */ @Deprecated @NotNull -@@ -44,7 +82,7 @@ public interface Sign extends TileState, Colorable { +@@ -44,7 +83,7 @@ public interface Sign extends TileState, Colorable { * @param index Line number to set the text at, starting from 0 * @param line New text to set at the specified index * @throws IndexOutOfBoundsException If the index is out of the range 0..3 diff --git a/patches/api/0153-Add-Material-Tags.patch b/patches/api/0153-Add-Material-Tags.patch index abe0d451ac..ef2f0502dd 100644 --- a/patches/api/0153-Add-Material-Tags.patch +++ b/patches/api/0153-Add-Material-Tags.patch @@ -1059,7 +1059,7 @@ index 0000000000000000000000000000000000000000..c89c4619aaf388197834d98eb95af2f1 +} diff --git a/src/main/java/io/papermc/paper/tag/EntityTags.java b/src/main/java/io/papermc/paper/tag/EntityTags.java new file mode 100644 -index 0000000000000000000000000000000000000000..d7eb49a05c3f0cacf285f8995433c5d5e988de0f +index 0000000000000000000000000000000000000000..5376e51adf5af15572b0d760b17f2de6d3f24a9b --- /dev/null +++ b/src/main/java/io/papermc/paper/tag/EntityTags.java @@ -0,0 +1,54 @@ @@ -1082,7 +1082,7 @@ index 0000000000000000000000000000000000000000..d7eb49a05c3f0cacf285f8995433c5d5 + + /** + * Covers undead mobs -+ * @see https://minecraft.gamepedia.com/Mob#Undead_mobs ++ * @see https://minecraft.wiki/wiki/Mob#Undead_mobs + */ + public static final EntitySetTag UNDEADS = new EntitySetTag(keyFor("undeads")) + .add(DROWNED, HUSK, PHANTOM, SKELETON, SKELETON_HORSE, STRAY, WITHER, WITHER_SKELETON, ZOGLIN, ZOMBIE, ZOMBIE_HORSE, ZOMBIE_VILLAGER, ZOMBIFIED_PIGLIN) @@ -1111,7 +1111,7 @@ index 0000000000000000000000000000000000000000..d7eb49a05c3f0cacf285f8995433c5d5 + + /** + * Covers all water based mobs -+ * @see https://minecraft.gamepedia.com/Mob#Water-based_mobs ++ * @see https://minecraft.wiki/wiki/Mob#Aquatic_mobs + */ + public static final EntitySetTag WATER_BASED = new EntitySetTag(keyFor("water_based")) + .add(AXOLOTL, DOLPHIN, SQUID, GLOW_SQUID, GUARDIAN, ELDER_GUARDIAN, TURTLE, COD, SALMON, PUFFERFISH, TROPICAL_FISH) diff --git a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch index 62b30242e7..01e4d47209 100644 --- a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch @@ -354,6 +354,19 @@ index be5baaf499cc76dd737d6203570e3d431c18afcf..c748679337989a7b4e2a39e542268b7f Spigot spigot(); // Spigot end +diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java +index 78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3..653a83b7ceb5cec1d92aed5250ae50e714fe5f9f 100644 +--- a/src/main/java/org/bukkit/block/Block.java ++++ b/src/main/java/org/bukkit/block/Block.java +@@ -517,7 +517,7 @@ public interface Block extends Metadatable, Translatable { + * @return a list of dropped items for this type of block + */ + @NotNull +- Collection getDrops(@NotNull ItemStack tool, @Nullable Entity entity); ++ Collection getDrops(@Nullable ItemStack tool, @Nullable Entity entity); // Paper + + /** + * Returns if the given item is a preferred choice to break this Block. diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java index 7c5438fa92053cdbd7a01483a9baa4d48df07b24..a4f0a5270693e1c4af4fad827fa0a2ce753e07b5 100644 --- a/src/main/java/org/bukkit/block/BlockState.java diff --git a/patches/api/0177-Add-BlockSoundGroup-interface.patch b/patches/api/0177-Add-BlockSoundGroup-interface.patch index 993c769c62..dd3fc87e20 100644 --- a/patches/api/0177-Add-BlockSoundGroup-interface.patch +++ b/patches/api/0177-Add-BlockSoundGroup-interface.patch @@ -76,7 +76,7 @@ index 0000000000000000000000000000000000000000..ec36942128cbacae171584c89480b4aa + Sound getFallSound(); +} diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3..b0b148918eeaf10d60734def6ac84b678c0d74c7 100644 +index 653a83b7ceb5cec1d92aed5250ae50e714fe5f9f..2b267d4c9adcc13722d4a655a98ca16a0f9746ca 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -607,4 +607,25 @@ public interface Block extends Metadatable, Translatable { diff --git a/patches/api/0181-Improve-Block-breakNaturally-API.patch b/patches/api/0181-Improve-Block-breakNaturally-API.patch index b96cf1505a..d4871c1eb0 100644 --- a/patches/api/0181-Improve-Block-breakNaturally-API.patch +++ b/patches/api/0181-Improve-Block-breakNaturally-API.patch @@ -10,7 +10,7 @@ Adds bool param to trigger exp drops for blocks Co-authored-by: William Blake Galbreath diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index b0b148918eeaf10d60734def6ac84b678c0d74c7..232662f3130ca49156ed8b71acf4495aea33c212 100644 +index 2b267d4c9adcc13722d4a655a98ca16a0f9746ca..22cfffddb681a7ed95e19f4da6e2c272d22a6f69 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -481,6 +481,52 @@ public interface Block extends Metadatable, Translatable { diff --git a/patches/api/0211-Add-methods-to-get-translation-keys.patch b/patches/api/0211-Add-methods-to-get-translation-keys.patch index c73972b31a..24ea1982d3 100644 --- a/patches/api/0211-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0211-Add-methods-to-get-translation-keys.patch @@ -282,7 +282,7 @@ index d3087d60378822cdd7cea25fd63d3f496e3cd2fb..5d8fa5b39a5d50cca48ba63af3a84b80 + // Paper end } diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 232662f3130ca49156ed8b71acf4495aea33c212..5ae85ddc2cff3145dcba877a7bf55abd818f6881 100644 +index 22cfffddb681a7ed95e19f4da6e2c272d22a6f69..4dcfff9aa28eec3467d49d6fcc00f22943fd9c92 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable; diff --git a/patches/api/0223-Add-Destroy-Speed-API.patch b/patches/api/0223-Add-Destroy-Speed-API.patch index 9b4e942bd1..84faaef8ce 100644 --- a/patches/api/0223-Add-Destroy-Speed-API.patch +++ b/patches/api/0223-Add-Destroy-Speed-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 5ae85ddc2cff3145dcba877a7bf55abd818f6881..89bd97153d874c2710304d163f7c46062d8c8bab 100644 +index 4dcfff9aa28eec3467d49d6fcc00f22943fd9c92..137a40c708bb67de4608447975867a07240ddc88 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -681,4 +681,31 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0233-Additional-Block-Material-API-s.patch b/patches/api/0233-Additional-Block-Material-API-s.patch index f6fd2d67e9..f20f4d9d39 100644 --- a/patches/api/0233-Additional-Block-Material-API-s.patch +++ b/patches/api/0233-Additional-Block-Material-API-s.patch @@ -9,7 +9,7 @@ process to do this in the Bukkit API Adds API for buildable, replaceable, burnable too. diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 89bd97153d874c2710304d163f7c46062d8c8bab..de3daacb3080200986a4e406c1465dfe6c695f22 100644 +index 137a40c708bb67de4608447975867a07240ddc88..3fd364e5875f95296e75dede4c610d3dd3e0038e 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -439,6 +439,42 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0263-Add-Block-isValidTool.patch b/patches/api/0263-Add-Block-isValidTool.patch index 18f46e340e..0a86ea4c67 100644 --- a/patches/api/0263-Add-Block-isValidTool.patch +++ b/patches/api/0263-Add-Block-isValidTool.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Block#isValidTool diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index de3daacb3080200986a4e406c1465dfe6c695f22..0f0eee8a03ef301c1ab6a408ff718411d3d64e82 100644 +index 3fd364e5875f95296e75dede4c610d3dd3e0038e..6de4c858ff6e542daa0879092e4f99a948225964 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -230,6 +230,15 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0321-Add-isCollidable-methods-to-various-places.patch b/patches/api/0321-Add-isCollidable-methods-to-various-places.patch index 5ab0fd7766..323a6acf65 100644 --- a/patches/api/0321-Add-isCollidable-methods-to-various-places.patch +++ b/patches/api/0321-Add-isCollidable-methods-to-various-places.patch @@ -45,7 +45,7 @@ index 827da519862c32907b41be77f61d51a244b2a749..c9fdcda4d86a8419852d7acc0e85fe51 // Paper end } diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 0f0eee8a03ef301c1ab6a408ff718411d3d64e82..c5670b40880fa124c7615f9b1d379b75d7110f05 100644 +index 6de4c858ff6e542daa0879092e4f99a948225964..05fd2aa8a1639598b488712d2fe5f739019f41dc 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -482,6 +482,13 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0354-Add-getComputedBiome-API.patch b/patches/api/0354-Add-getComputedBiome-API.patch index d1866ce241..8239a273b8 100644 --- a/patches/api/0354-Add-getComputedBiome-API.patch +++ b/patches/api/0354-Add-getComputedBiome-API.patch @@ -51,7 +51,7 @@ index 63503cf17847a85264c930a9fc23a5aab5955c3c..93e20ca14a2b7e5817fab788b6dfa73c * Sets the {@link Biome} at the given {@link Location}. * diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index c5670b40880fa124c7615f9b1d379b75d7110f05..5e42a4c3aa872d9755f8cd5ce3f4ee36bcc71fb9 100644 +index 05fd2aa8a1639598b488712d2fe5f739019f41dc..732e8ea9e1bdcbc8f9a0888e07940fe21617b490 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -371,10 +371,22 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0373-Block-Ticking-API.patch b/patches/api/0373-Block-Ticking-API.patch index 9521d8b924..122cb9dd52 100644 --- a/patches/api/0373-Block-Ticking-API.patch +++ b/patches/api/0373-Block-Ticking-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block Ticking API diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 5e42a4c3aa872d9755f8cd5ce3f4ee36bcc71fb9..41b7310a514bf4d42c501e4bffe04008bda2541f 100644 +index 732e8ea9e1bdcbc8f9a0888e07940fe21617b490..49974558799830d827f9ccd65a8bafee3fb0376b 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -589,6 +589,21 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr diff --git a/patches/api/0379-Add-getDrops-to-BlockState.patch b/patches/api/0379-Add-getDrops-to-BlockState.patch index 78e5ef8f79..0a8d8ad13a 100644 --- a/patches/api/0379-Add-getDrops-to-BlockState.patch +++ b/patches/api/0379-Add-getDrops-to-BlockState.patch @@ -7,7 +7,7 @@ Originally added isPreferredTool to BlockData but upstream added that. diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java -index c439cf0bb6c50db2b3304c60e50046f096392f9f..ac277e43ba677dc1f47feb41b254a363771b6b73 100644 +index c439cf0bb6c50db2b3304c60e50046f096392f9f..ef35316fa66ac8d9c7836b9c8af56dcefbf6ff2e 100644 --- a/src/main/java/org/bukkit/block/BlockState.java +++ b/src/main/java/org/bukkit/block/BlockState.java @@ -243,5 +243,34 @@ public interface BlockState extends Metadatable { @@ -42,6 +42,6 @@ index c439cf0bb6c50db2b3304c60e50046f096392f9f..ac277e43ba677dc1f47feb41b254a363 + * @return an immutable list of dropped items for the block state + */ + @NotNull -+ java.util.@org.jetbrains.annotations.Unmodifiable Collection getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity); ++ java.util.@org.jetbrains.annotations.Unmodifiable Collection getDrops(@Nullable org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity); // Paper end } diff --git a/patches/api/0419-Add-Sign-getInteractableSideFor.patch b/patches/api/0419-Add-Sign-getInteractableSideFor.patch index ded9bb7ac7..c339b5b034 100644 --- a/patches/api/0419-Add-Sign-getInteractableSideFor.patch +++ b/patches/api/0419-Add-Sign-getInteractableSideFor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Sign#getInteractableSideFor diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java -index e6b87ad5b2099800a61e7f585a5404e9e672228a..2f90bbb1542580da5a45be881fe2143e9da96eca 100644 +index 2813f96bb13b9be28867d2c045a3003a18456879..94e8f319fe0413a10496d7e5bba70633054765f4 100644 --- a/src/main/java/org/bukkit/block/Sign.java +++ b/src/main/java/org/bukkit/block/Sign.java -@@ -166,4 +166,35 @@ public interface Sign extends TileState, Colorable { +@@ -167,4 +167,35 @@ public interface Sign extends TileState, Colorable { */ @NotNull public SignSide getSide(@NotNull Side side); diff --git a/patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch index 0752888f5e..208d14eeb6 100644 --- a/patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't call getItemMeta on hasItemMeta Spigot 1.13 checks if any field (which are manually copied from the ItemStack's "tag" NBT tag) on the ItemMeta class of an ItemStack is set. -We could just check if the "tag" NBT tag is empty, albeit that would break some plugins. The only general tag added on 1.13 is "Damage", and we can just check if the "tag" NBT tag contains any other tag that's not "Damage" (https://minecraft.gamepedia.com/Player.dat_format#Item_structure) making the `hasItemStack` method behave as before. +We could just check if the "tag" NBT tag is empty, albeit that would break some plugins. The only general tag added on 1.13 is "Damage", and we can just check if the "tag" NBT tag contains any other tag that's not "Damage" (https://minecraft.wiki/wiki/Player.dat_format#Item_structure) making the `hasItemStack` method behave as before. Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/patches/server/0488-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0488-Add-Wandering-Trader-spawn-rate-config-options.patch index 87891d128b..09e0c87600 100644 --- a/patches/server/0488-Add-Wandering-Trader-spawn-rate-config-options.patch +++ b/patches/server/0488-Add-Wandering-Trader-spawn-rate-config-options.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Wandering Trader spawn rate config options Adds config options for modifying the spawn rates of Wandering Traders. These values are all easy to understand and configure after a quick read of this -page on the Minecraft wiki: https://minecraft.gamepedia.com/Wandering_Trader#Spawning +page on the Minecraft wiki: https://minecraft.wiki/wiki/Wandering_Trader#Spawning Usages of the vanilla WanderingTraderSpawnDelay and WanderingTraderSpawnChance values in IWorldServerData are removed as they were only used in certain places, with hardcoded values used in other places.