Paper/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch
Aikar 57dd397155
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b999860d SPIGOT-2304: Add LootGenerateEvent

CraftBukkit Changes:
77fd87e4 SPIGOT-2304: Implement LootGenerateEvent
a1a705ee SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent
41712edd SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
2020-05-01 18:03:57 -04:00

31 lines
1.1 KiB
Diff

From 4bbba33157c98db6b74b394a0725b98fa7ef1e24 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 966d23add1..da86ee4149 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -623,4 +623,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t));
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}
--
2.26.2