Update AbstractArrow item method implementations for 1.20.6 (#10885)
This commit is contained in:
parent
4bc15f13aa
commit
5bd7f4e8ae
8 changed files with 32 additions and 17 deletions
|
@ -7,7 +7,7 @@ Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
|||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
index 493f81ba879d1eb29a32722da27e4ff7ce4c68a8..a3a979ca7cbc89c43713fbcc9e6524fb347fa2e2 100644
|
||||
index 493f81ba879d1eb29a32722da27e4ff7ce4c68a8..15c7149cf9f6a0b1d99134122bb36672de72c7ca 100644
|
||||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
@@ -139,17 +139,21 @@ public interface AbstractArrow extends Projectile {
|
||||
|
@ -25,26 +25,34 @@ index 493f81ba879d1eb29a32722da27e4ff7ce4c68a8..a3a979ca7cbc89c43713fbcc9e6524fb
|
|||
* 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
|
||||
+ * @deprecated use {@link #getItemStack()}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
+ @Deprecated // Paper - remove in 1.20.5
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.4") // Paper
|
||||
public void setItem(@NotNull ItemStack item);
|
||||
|
||||
/**
|
||||
@@ -220,4 +224,44 @@ public interface AbstractArrow extends Projectile {
|
||||
@@ -220,4 +224,52 @@ public interface AbstractArrow extends Projectile {
|
||||
CREATIVE_ONLY;
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Paper start - more projectile API
|
||||
+ /**
|
||||
+ * Gets the ItemStack for this arrow.
|
||||
+ * Gets the {@link ItemStack} for this arrow. This stack is used
|
||||
+ * for both visuals on the arrow and the stack that could be picked up.
|
||||
+ *
|
||||
+ * @return The ItemStack, as if a player picked up the arrow
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ org.bukkit.inventory.ItemStack getItemStack();
|
||||
+ @NotNull ItemStack getItemStack();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the {@link ItemStack} for this arrow. This stack is used for both
|
||||
+ * visuals on the arrow and the stack that could be picked up.
|
||||
+ *
|
||||
+ * @param stack the arrow stack
|
||||
+ */
|
||||
+ void setItemStack(@NotNull ItemStack stack);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the amount of ticks this arrow has been alive in the world
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue