diff --git a/patches/api/Expose-Arrow-getItemStack.patch b/patches/api/Improve-Arrow-API.patch similarity index 64% rename from patches/api/Expose-Arrow-getItemStack.patch rename to patches/api/Improve-Arrow-API.patch index 084f224f33..36f6bc94b9 100644 --- a/patches/api/Expose-Arrow-getItemStack.patch +++ b/patches/api/Improve-Arrow-API.patch @@ -1,8 +1,12 @@ 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 -Subject: [PATCH] Expose Arrow getItemStack +Subject: [PATCH] Improve Arrow API +Add method to get the arrow's itemstack and a method +to set the arrow's "noclip" status + +Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -19,6 +23,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @NotNull + org.bukkit.inventory.ItemStack getItemStack(); ++ ++ /** ++ * 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(); + /** * Gets the {@link PickupRule} for this arrow. diff --git a/patches/server/Expose-Arrow-getItemStack.patch b/patches/server/Improve-Arrow-API.patch similarity index 72% rename from patches/server/Expose-Arrow-getItemStack.patch rename to patches/server/Improve-Arrow-API.patch index 49aa5a294a..38ffc8c59a 100644 --- a/patches/server/Expose-Arrow-getItemStack.patch +++ b/patches/server/Improve-Arrow-API.patch @@ -1,8 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Nesaak <52047222+Nesaak@users.noreply.github.com> Date: Sat, 23 May 2020 10:31:11 -0400 -Subject: [PATCH] Expose Arrow getItemStack +Subject: [PATCH] Improve Arrow API +Add method to get the arrow's itemstack and a method +to set the arrow's "noclip" status + +Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -17,6 +21,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() { + return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem()); + } ++ ++ @Override ++ public void setNoPhysics(boolean noPhysics) { ++ this.getHandle().setNoPhysics(noPhysics); ++ } ++ ++ @Override ++ public boolean hasNoPhysics() { ++ return this.getHandle().isNoPhysics(); ++ } + // Paper end + @Override