2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Nesaak <52047222+Nesaak@users.noreply.github.com>
|
|
|
|
Date: Fri, 22 May 2020 13:35:21 -0400
|
2022-03-06 21:19:08 +00:00
|
|
|
Subject: [PATCH] Improve Arrow API
|
2021-06-11 12:02:28 +00:00
|
|
|
|
2022-03-06 21:19:08 +00:00
|
|
|
Add method to get the arrow's itemstack and a method
|
|
|
|
to set the arrow's "noclip" status
|
|
|
|
|
|
|
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
2022-03-06 21:19:08 +00:00
|
|
|
index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..225a24898acd25038ea2a8448f9f3b57643d3026 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
2022-03-06 21:19:08 +00:00
|
|
|
@@ -143,6 +143,28 @@ public interface AbstractArrow extends Projectile {
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Gets the ItemStack for this arrow.
|
|
|
|
+ *
|
|
|
|
+ * @return The ItemStack, as if a player picked up the arrow
|
|
|
|
+ */
|
|
|
|
+ @NotNull
|
|
|
|
+ org.bukkit.inventory.ItemStack getItemStack();
|
2022-03-06 21:19:08 +00:00
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Sets this arrow to "noclip" status.
|
|
|
|
+ *
|
|
|
|
+ * @param noPhysics true to set "noclip"
|
|
|
|
+ */
|
|
|
|
+ void setNoPhysics(boolean noPhysics);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Gets if this arrow has "noclip".
|
|
|
|
+ *
|
|
|
|
+ * @return true if noclip is active
|
|
|
|
+ */
|
|
|
|
+ boolean hasNoPhysics();
|
2021-06-11 12:02:28 +00:00
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Gets the {@link PickupRule} for this arrow.
|
|
|
|
*
|