Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
Some jd fixes (#9781)
Dieser Commit ist enthalten in:
Ursprung
c4ba28a21a
Commit
38376f43a0
@ -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 <T> 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 <T> 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<Arguments> 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
|
||||
|
@ -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<net.kyori.adventure.text.Component> 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
|
||||
|
@ -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 <a href="https://minecraft.gamepedia.com/Mob#Undead_mobs">https://minecraft.gamepedia.com/Mob#Undead_mobs</a>
|
||||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Undead_mobs">https://minecraft.wiki/wiki/Mob#Undead_mobs</a>
|
||||
+ */
|
||||
+ 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 <a href="https://minecraft.gamepedia.com/Mob#Water-based_mobs">https://minecraft.gamepedia.com/Mob#Water-based_mobs</a>
|
||||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Aquatic_mobs">https://minecraft.wiki/wiki/Mob#Aquatic_mobs</a>
|
||||
+ */
|
||||
+ 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)
|
||||
|
@ -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<ItemStack> getDrops(@NotNull ItemStack tool, @Nullable Entity entity);
|
||||
+ Collection<ItemStack> 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
|
||||
|
@ -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 {
|
||||
|
@ -10,7 +10,7 @@ Adds bool param to trigger exp drops for blocks
|
||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
|
||||
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 {
|
||||
|
@ -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;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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<org.bukkit.inventory.ItemStack> getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity);
|
||||
+ java.util.@org.jetbrains.annotations.Unmodifiable Collection<org.bukkit.inventory.ItemStack> getDrops(@Nullable org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity);
|
||||
// Paper end
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren