Paper/patches/server/0462-Expose-Arrow-getItemStack.patch
Finn Künstner d060913a61
[ci skip] Fix typos in Paper comments (#6588)
* //Paper -> // Paper

* // Tuiniy -> // Paper
2021-09-11 12:22:51 +02:00

25 lines
1.1 KiB
Diff

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
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index 376885c8148da619a3b203145d315ebaf44994fb..454c8fab2f0b60aa3afd73805ea3586881605450 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -102,6 +102,13 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
this.getHandle().pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.byOrdinal(status.ordinal());
}
+ // Paper start
+ @Override
+ public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() {
+ return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem());
+ }
+ // Paper end
+
@Override
public void setTicksLived(int value) {
super.setTicksLived(value);