-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AbstractArrow item method implementations for 1.20.6 (#10885)
- Loading branch information
1 parent
9e7f6c3
commit 5914f60
Showing
2 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Co-authored-by: Nassim Jahnke <[email protected]> | |
Co-authored-by: SoSeDiK <[email protected]> | ||
|
||
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java | ||
index 839e5b7df49f42b5fec7729997bef3370ba36d80..b36298679d6d52d09fe4bb8e52e19e18f6df742a 100644 | ||
index 839e5b7df49f42b5fec7729997bef3370ba36d80..07b7d3ddd6c8400c39578f8c09df13dc2411be1d 100644 | ||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java | ||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java | ||
@@ -130,17 +130,21 @@ public interface AbstractArrow extends Projectile { | ||
|
@@ -25,26 +25,34 @@ index 839e5b7df49f42b5fec7729997bef3370ba36d80..b36298679d6d52d09fe4bb8e52e19e18 | |
* 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); | ||
|
||
/** | ||
@@ -194,4 +198,44 @@ public interface AbstractArrow extends Projectile { | ||
@@ -194,4 +198,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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters