Paper/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch
Spottedleaf c68dbb864c Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2576)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

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:
6527cb58 SPIGOT-5329: Clarify isGlowing documentation
5ddb414f Make Lantern extend BlockData
cb888903 Fix typos in previous commits
2a5e0ca2 Bring EnchantItemEvent documentation in line with EnchantmentOffer
3c5fcea2 SPIGOT-5317: Create accessors for player absorption hearts
c6e0d625 SPIGOT-5320: Clarify scope of ExactChoice

CraftBukkit Changes:
a3fdef8c SPIGOT-5331: Add support for Java 13
6ddeb980 SPIGOT-5317: Create accessors for player absorption hearts
5d335e96 SPIGOT-5315: Cannot serialize armor stand ItemMeta

Spigot Changes:
94af569b SPIGOT-5319: Async catcher for getNearbyEntities
2019-09-21 23:12:45 -05:00

31 lines
1.1 KiB
Diff

From 8114e0e26ee38a3683d2167e0cba2ff3423bb941 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 029c2d475..7e9aff668 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -611,4 +611,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.22.1